Repository navigation
api,cli: fix running changefeed resume handling (#4894) - #5328
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces a validation guard to ensure that a changefeed can only be resumed if it is in a resumable state (stopped, failed, or finished). This check is implemented across the API, CLI, and coordinator controller layers, preventing invalid resume requests early in the process. Comprehensive unit tests have been added to verify this behavior across all affected components. 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 |
Resolve the add/add conflict in api/v2/changefeed_test.go while preserving the current release branch tests and the resume regression coverage. Remove a master-only batch field test that the automated cherry-pick copied into release-8.5, where the referenced fields do not exist. Signed-off-by: wlwilliamx <wlwilliamx@gmail.com>
|
/test all |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lidezhu, wlwilliamx 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 |
The release branch now reloads persisted changefeed info before validating resume state. Teach the normal-state fake to return the same persisted view so the regression test continues to exercise that guard. Signed-off-by: wlwilliamx <wlwilliamx@gmail.com>
|
/test all |
|
/retest |
1 similar comment
|
/retest |
This is an automated cherry-pick of #4894
What problem does this PR solve?
Issue Number: close #4893
What is changed and how it works?
This PR rejects
changefeed resumerequests when the changefeed is already in a running state.The change adds a shared
FeedState.IsResumablepredicate and uses it in:cdc cli changefeed resumefails before printing a misleading success message or sending the resume request.ErrChangefeedUpdateRefused.This prevents running changefeeds from reporting resume success and avoids creating unnecessary resuming GC guards for invalid resume requests.
Check List
Tests
go test ./api/v2 ./coordinator ./pkg/config ./cmd/cdc/cli -count=1Questions
Will it cause performance regression or break compatibility?
No performance regression. Invalid resume requests for running changefeeds now return an explicit error instead of success/no-op.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note
Summary by CodeRabbit
Bug Fixes
Tests