Conversation
A checkpoint can rewrite a CSR node group while a scan is still walking the header, pages, and in-memory lists it started with. Pin that state on the scan, and keep those pages until the scan finishes.
This was referenced Oct 5, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A rel scan that is already running when
CSRNodeGroup::checkpointruns kept its cached CSR header, then read the group the checkpoint had replaced. In-memory rels disappeared. On a persistent group, newly inserted rels were missing and deleted rels came back. This is the CSR follow-up to #1094. The node-table refresh does not carry over: CSR offsets move during checkpoint, andCSRNodeGroup::checkpointdoes not bump the counter that refresh checks. Fixes #1053.The scan pins the persistent chunk metadata, version info, column updates, CSR index, and in-memory groups it started with. While a scan holds that pin, checkpoint writes replacement pages out of place and frees the old pages only when the last scan drops the pin. Checkpoint does not wait for the scan.
Release build,
ENABLE_RUNTIME_CHECKSoff, before the fix:After the fix those three pass, as does a scan that starts inside the shadow-page window.
ScanAcrossCheckpointTest(the #1094 node scans) still passes, andCSRGroupReadsBackAfterFailedCSRHeaderCheckpointstill passes. No on-disk format change.Types of changes
Checklist