Skip to content

fix(indexing): keep checkpoint progress monotonic#412

Merged
yordis merged 2 commits into
masterfrom
yordis/fix-index-checkpoint-progress
Jun 29, 2026
Merged

fix(indexing): keep checkpoint progress monotonic#412
yordis merged 2 commits into
masterfrom
yordis/fix-index-checkpoint-progress

Conversation

@yordis

@yordis yordis commented Jun 29, 2026

Copy link
Copy Markdown
Member
  • Checkpoint progress must not move backwards once a processor has observed or persisted a later transaction-file position.
  • Preserving that invariant keeps retry and concurrent commit paths safe before the lifecycle is wired into real components.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor

cursor Bot commented Jun 29, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes persistence semantics for index checkpoints (recovery/replay correctness), but scope is limited to IndexCheckpointWriter and is heavily covered by new concurrency and failure-path tests.

Overview
IndexCheckpointWriter now keeps index checkpoint progress strictly forward-moving by tracking latest observed and persisted positions, not only a pending write.

Read seeds those baselines from the store and drops any pending checkpoint that is no longer ahead of what was persisted. Track rejects regressions (with a clear “backwards” error), treats duplicate positions as idempotent, and advances the latest marker. Commit skips store writes when pending is stale, leaves pending intact after a failed write for retry, clears pending only after a successful write of that snapshot, and still allows a higher position tracked during an in-flight commit to be written on the next commit.

Tests cover seeding from read, stale pending discard, regression guards, idempotent commits, retry after write failure, and concurrent track-during-commit behavior (via blocking fakes).

Reviewed by Cursor Bugbot for commit 003d86d. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yordis, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 30 minutes and 52 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 95296cad-bcd3-495d-a9ef-c1f1a8c64db8

📥 Commits

Reviewing files that changed from the base of the PR and between f84c3f8 and 003d86d.

📒 Files selected for processing (2)
  • src/EventStore.Core.XUnit.Tests/Services/Storage/Indexing/IndexCheckpointWriterTests.cs
  • src/EventStore.Core/Services/Storage/Indexing/IndexCheckpointWriter.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/fix-index-checkpoint-progress

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d7900a9. Configure here.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis merged commit 8e4152f into master Jun 29, 2026
21 checks passed
@yordis yordis deleted the yordis/fix-index-checkpoint-progress branch June 29, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant