From c952f022bb4b3703ee8bc20604e2cda34c84128d Mon Sep 17 00:00:00 2001 From: Egor Suvorov Date: Thu, 25 Aug 2022 13:29:37 +0300 Subject: [PATCH] waldecoder: fix comment --- libs/postgres_ffi/src/waldecoder.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/postgres_ffi/src/waldecoder.rs b/libs/postgres_ffi/src/waldecoder.rs index 768e79621d..b509fc87a5 100644 --- a/libs/postgres_ffi/src/waldecoder.rs +++ b/libs/postgres_ffi/src/waldecoder.rs @@ -170,6 +170,7 @@ impl WalStreamDecoder { } State::SkippingEverything { .. } => {} } + // now read page contents match &mut self.state { State::WaitingForRecord => { // need to have at least the xl_tot_len field @@ -194,8 +195,8 @@ impl WalStreamDecoder { return Ok(Some(self.complete_record(recordbuf)?)); } else { // Need to assemble the record from pieces. Remember the size of the - // record, and loop back. On next iteration, we will reach the 'else' - // branch below, and copy the part of the record that was on this page + // record, and loop back. On next iterations, we will reach the branch + // below, and copy the part of the record that was on this or next page(s) // to 'recordbuf'. Subsequent iterations will skip page headers, and // append the continuations from the next pages to 'recordbuf'. self.state = State::ReassemblingRecord {