You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adapt Checkpoint to copy a consistent snapshot of the database. Previously
Checkpoint acquired a Version, ensuring a consistent snapshot of the sstables
within the version, but copied the WALs arbitrarily. This allowed Checkpoint to
race with inflight WAL writes and allowed for a few sources of inconsistency
in checkpoints:
- The checkpointing goroutine racing with the LogWriter could copy an old block
from a WAL file's recycled history, followed by a new block containing recent
writes. If a chunk in the new block indicated that the old block should've
been durably synced, the WAL was considered corrupt on replay when the
checkpoint was opened.
- The checkpointing goroutine could copy WAL records containing batches that
were committed after version edits (eg, ingests, excises) that were committed
after the checkpointed Version. This would violate the checkpoint's
consistency.
Now Checkpoint reads the current visible sequence number and only copies the
prefix of the WAL that is visible at the sequence number. This ensures that a
Checkpoint's snapshot isolation semantics mirror that of an Iterator.
0 commit comments