From 8f71bfe8f922ada475bc36fdc87bdc7827c75638 Mon Sep 17 00:00:00 2001 From: Patrick Insinger Date: Tue, 5 Oct 2021 22:03:01 -0700 Subject: [PATCH] walredo - move nonrel redo logic into function --- pageserver/src/walredo/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pageserver/src/walredo/mod.rs b/pageserver/src/walredo/mod.rs index 6ac1dfcad7..0d2aee27a7 100644 --- a/pageserver/src/walredo/mod.rs +++ b/pageserver/src/walredo/mod.rs @@ -252,14 +252,13 @@ impl PostgresRedoManager { let start = Instant::now(); - let apply_result: Result; - if let RelishTag::Relation(rel) = rel { + let apply_result = if let RelishTag::Relation(rel) = rel { // Relational WAL records are applied using wal-redo-postgres let buf_tag = BufferTag { rel, blknum }; - apply_result = process.apply_wal_records(buf_tag, base_img, records).await; + process.apply_wal_records(buf_tag, base_img, records).await } else { - apply_result = Ok(nonrel::apply_nonrel(request)); - } + Ok(nonrel::apply_nonrel(request)) + }; let duration = start.elapsed();