downstreamadapter: skip obsolete replayed events#5422
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Warning Review limit reached
More reviews will be available in 58 minutes and 35 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces mechanisms to skip obsolete DML and block events that are already completed, resets event deduplication filters when advancing epochs for reset, and resets the event service upon releasing dispatcher memory. Additionally, it fixes a potential no-progress loop in the event scanner when scanning deleted tables by finalizing the scan at the raw event's commit timestamp instead of subtracting one. There are no review comments to address, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/test all |
|
/test all |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
| // The new epoch replays events from resetTs. Commit-ts based | ||
| // deduplication from the old epoch must not filter replayed DDL or | ||
| // SyncPoint events. | ||
| d.lastEventCommitTs.Store(resetTs) |
There was a problem hiding this comment.
Can you add a concrete example to explain why these three lines is necessary?
What problem does this PR solve?
Issue Number: close #5421
Dispatcher reset, dynstream path release, and DDL/syncpoint replay can reuse stale commit-ts state or reprocess completed block events.
What is changed and how it works?
This PR resets event-collector commit-ts deduplication when a dispatcher enters a new epoch, resets the current event-service session after dynstream releases queued events, and tracks completed DDL/syncpoint block events so obsolete DML/block events are skipped.
The EventService deleted-table scan fix has been split into #5489.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No. The changes only affect replay and stale-event handling in reset/completed-block paths.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note