logpuller: send CDC scan priority#5480
Conversation
|
Skipping CI for Draft Pull Request. |
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the 📖 For more info, you can check the "Contribute Code" section in the development guide. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
[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 |
There was a problem hiding this comment.
Code Review
This pull request updates the kvproto dependency and introduces support for preserving scan priority across retries when handling congested or busy server errors in logpuller. It adds mapping utilities between TaskType and cdcpb.ScanPriority, stores the scan priority in regionInfo, and ensures it is propagated and maintained during retries. Comprehensive unit tests are also added to verify these mappings and retry behaviors. I have no 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.
Background
TiCDC creates different kinds of log puller region tasks. Bootstrap scans for newly created changefeeds should not have the same downstream scan priority as repair or retry scans that affect existing changefeed lag.
Motivation
Propagating scan priority through
ChangeDataRequestlets CSE protect high-priority CDC scans while scheduling new changefeed bootstrap scans as low priority.Summary
cdcpb.ScanPriority.ChangeDataRequest.ScanPrioritywhen building CDC requests.github.com/pingcap/kvprototo the protocol branch pseudo-version.Dependencies
Validation
go mod tidymake fmt FILES='logservice/logpuller/priority_task.go logservice/logpuller/priority_task_test.go logservice/logpuller/region_request_worker.go logservice/logpuller/region_request_worker_test.go logservice/logpuller/region_state.go logservice/logpuller/subscription_client.go logservice/logpuller/subscription_client_test.go'go test ./logservice/logpuller