From 8012b80a450db4638b1363fad72fd02918c2de0a Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 31 Jan 2024 12:17:05 +0100 Subject: [PATCH] some cleanup work --- pageserver/src/walredo.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pageserver/src/walredo.rs b/pageserver/src/walredo.rs index b56ae99add..f29823aff8 100644 --- a/pageserver/src/walredo.rs +++ b/pageserver/src/walredo.rs @@ -826,14 +826,10 @@ impl WalRedoProcess { async fn apply_wal_records0(&self, writebuf: &[u8]) -> anyhow::Result { let input = self.stdin.lock().await; - - let mut proc = { input }; // TODO: remove this legacy rename, but this keep the patch small. - - proc.stdin.write_all(writebuf).await.unwrap(); // TODO: bring back timeout & error handling - - let request_no = proc.n_requests; - proc.n_requests += 1; - drop(proc); + input.stdin.write_all(writebuf).await.unwrap(); // TODO: bring back timeout & error handling + let request_no = input.n_requests; + input.n_requests += 1; + drop(input); // To improve walredo performance we separate sending requests and receiving // responses. Them are protected by different mutexes (output and input).