Temporarily remove optimization for new read tx to grab read mark 0 and skip db file

This commit is contained in:
PThorpe92
2025-07-22 23:12:05 -04:00
committed by Jussi Saurio
parent 318bfa9590
commit ff1987a45c

View File

@@ -678,8 +678,8 @@ impl Wal for WalFile {
return Ok((LimboResult::Ok, db_has_changed));
}
}
let mut max_read_mark = 0;
let mut max_read_mark_index = -1;
let mut max_read_mark = 0;
// Find the largest mark we can find, ignore frames that are impossible to be in range and
// that are not set
for (index, lock) in self.get_shared().read_locks.iter().enumerate().skip(1) {
@@ -1195,7 +1195,6 @@ impl WalFile {
(max_frame, n_backfills)
};
let needs_backfill = max_frame > nbackfills;
if !needs_backfill && matches!(mode, CheckpointMode::Passive) {
// there are no frames to copy over and we don't need to reset
// the log so we can return early success.