[dbsp] Avoid race updating checkpoint catalog file. - #6751
Closed
blp wants to merge 1 commit into
Closed
Conversation
mihaibudiu
approved these changes
Jul 29, 2026
| /// while the checkpoints themselves are likely still on disk, and | ||
| /// proceeding would let `gc_startup` recursively delete them, so we refuse | ||
| /// to start instead. | ||
| fn read_checkpoints_for_startup( |
Contributor
There was a problem hiding this comment.
"for startup" or "at startup"?
Member
Author
There was a problem hiding this comment.
I guess at_startup is a little better. Updated.
Commit 92b29a4 ("[dbsp] Avoid repeatedly listing files in storage with no checkpoints.") changed Checkpointer::read_checkpoints() to write an empty checkpoint file if it found that one did not exist. A failing CI run demonstrated that this in fact introduced a race against checkpoint synchronization. This commit fixes the problem by using a different approach: instead of writing a checkpoint catalog file, we only do the full scan of the directory once at startup instead of every time we try to read the catalog. This still accomplishes the original goal of avoiding doing a full directory scan every time. Fixes: #6750 Signed-off-by: Ben Pfaff <blp@feldera.com>
blp
enabled auto-merge
July 29, 2026 17:18
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 29, 2026
Contributor
|
This passed for me previously, maybe you can give more memory to datafusion in the failing test? |
Member
Author
I'll submit a PR for that failure too. |
Member
Author
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 29, 2026
Member
Author
|
Closing this because I'm merging it as part of #6754 |
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.
Commit 92b29a4 ("[dbsp] Avoid repeatedly listing files in storage with no checkpoints.") changed Checkpointer::read_checkpoints() to write an empty checkpoint file if it found that one did not exist. A failing CI run demonstrated that this in fact introduced a race against checkpoint synchronization.
This commit fixes the problem by using a different approach: instead of writing a checkpoint catalog file, we only do the full scan of the directory once at startup instead of every time we try to read the catalog. This still accomplishes the original goal of avoiding doing a full directory scan every time.
Fixes: #6750