walredo - move nonrel redo logic into function

This commit is contained in:
Patrick Insinger
2021-10-05 22:03:01 -07:00
parent f644009b5c
commit 8f71bfe8f9

View File

@@ -252,14 +252,13 @@ impl PostgresRedoManager {
let start = Instant::now();
let apply_result: Result<Bytes, Error>;
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();