Remove commented-out code and update min_frame assignment

This commit is contained in:
Daniel Boll 2025-03-25 21:44:18 -03:00
parent 5fc9ccdc8c
commit 6d42d6d485
2 changed files with 2 additions and 3 deletions

View file

@ -1396,7 +1396,6 @@ pub fn begin_write_wal_frame(
buf[16..20].copy_from_slice(&header.checksum_1.to_be_bytes());
buf[20..24].copy_from_slice(&header.checksum_2.to_be_bytes());
// buf[WAL_FRAME_HEADER_SIZE..].copy_from_slice(contents.as_ptr());
#[allow(clippy::arc_with_non_send_sync)]
(Arc::new(RefCell::new(buffer)), final_checksum)

View file

@ -509,8 +509,8 @@ impl Wal for WalFile {
match state {
CheckpointState::Start => {
// TODO(pere): check what frames are safe to checkpoint between many readers!
self.ongoing_checkpoint.min_frame = 1; // TODO(daniel): Check if 1
// is needed here
self.ongoing_checkpoint.min_frame = self.min_frame; // TODO(daniel): Check if 1
// is needed here
let mut shared = self.shared.write();
let mut max_safe_frame = shared.max_frame;
for (read_lock_idx, read_lock) in shared.read_locks.iter_mut().enumerate() {