From eecf6ae6e6be133f3e3b3961921830c05e656fa1 Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Tue, 10 Jun 2025 09:08:34 -0400 Subject: [PATCH] Wait till we write the page to increment current page in wal checkpoint --- core/storage/wal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/storage/wal.rs b/core/storage/wal.rs index 0e115d321..c1bae113f 100644 --- a/core/storage/wal.rs +++ b/core/storage/wal.rs @@ -748,7 +748,6 @@ impl Wal for WalFile { self.buffer_pool.clone(), )?; self.ongoing_checkpoint.state = CheckpointState::WaitReadFrame; - self.ongoing_checkpoint.current_page += 1; continue 'checkpoint_loop; } } @@ -778,6 +777,7 @@ impl Wal for WalFile { if (self.ongoing_checkpoint.current_page as usize) < shared.pages_in_frames.lock().len() { + self.ongoing_checkpoint.current_page += 1; self.ongoing_checkpoint.state = CheckpointState::ReadFrame; } else { self.ongoing_checkpoint.state = CheckpointState::Done;