mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 20:14:21 +01:00
in #2521, I messed up and introduced improper calculation of the current checkpoint's max safe frame (mostly due to incorrect comments that I had left on the method). The confusion partially stems from our lack of Busy handling at the moment, but essentially when determining the max safe frame for all readers, for passive mode we cannot simply `break` out of the loop when we find a reader with a lower read mark than we have, because _another_ reader might have an even _lower_ read mark, and we could proceed with the first mark < shared_max. And for !passive modes, we still attempt to backfill with the same lower frame, we just return `Busy` at the end, after backfilling what we can (we just don't reset the log for restart/truncate). Most of the changes in this PR is just the renaming the fields of Checkpoint Result, because the names were confusing Closes #2560