eventservice: advance scan window for pending syncpoints#5547
eventservice: advance scan window for pending syncpoints#5547asddongmen wants to merge 2 commits into
Conversation
|
Skipping CI for Draft Pull Request. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughModifies ChangesSync point scan window fix
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Command failed 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 support for advancing the scan window when there are pending sync point events, ensuring dispatchers can make forward progress and cross sync points even when the global scan window is pinned. A unit test has been added to verify this behavior. Feedback is provided regarding a potential race condition or inconsistency caused by loading task.nextSyncPoint twice, with a suggestion to reuse the already loaded value.
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.
8545cb5 to
c5f3139
Compare
|
/test all |
…eventservice-syncpoint-scan-window
|
/test all |
| localScanMaxTs := oracle.GoTimeToTS(oracle.GetTimeFromTS(dataRange.CommitTsStart).Add(interval)) | ||
| if hasPendingSyncPointEventInCurrentRange && nextSyncPointTs >= dataRange.CommitTsStart && | ||
| localScanMaxTs <= nextSyncPointTs { | ||
| localScanMaxTs = nextSyncPointTs + 1 |
There was a problem hiding this comment.
What will happen if localScanMaxTs Ts is less than nextSyncPointTs?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lidezhu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: close #5546
This PR splits the eventBroker runtime fix from #5542.
When the event service scan window is pinned by another lagging dispatcher, a dispatcher with a pending syncpoint barrier can get an empty scan range and fail to advance far enough to emit the syncpoint. The existing local scan-window advance path handled pending DDL barriers only.
What is changed and how it works?
nextSyncPointTswhen the syncpoint would otherwise remain outside the bounded step.Source PR: #5542
Check List
Tests
Commands run:
git diff --checkPATH=/usr/local/go/bin:$PATH GOTOOLCHAIN=auto go test ./pkg/eventservice -run TestGetScanTaskDataRangeEmptyAfterCappingWithPendingSyncPointCrossesSyncPoint -count=1PATH=/usr/local/go/bin:$PATH GOTOOLCHAIN=auto make unit_test_pkg PKG=./pkg/eventservice/...Questions
Will it cause performance regression or break compatibility?
No. The change only expands an existing local scan-window advance path to cover pending syncpoint barriers, matching the DDL barrier behavior.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note
Summary by CodeRabbit