-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
br/restore: use a more relax check for changefeeds when restoring #53121
Conversation
Signed-off-by: Yu Juncen <[email protected]>
Signed-off-by: Yu Juncen <[email protected]>
Signed-off-by: Yu Juncen <[email protected]>
Signed-off-by: Yu Juncen <[email protected]>
Signed-off-by: Yu Juncen <[email protected]>
Hi @YuJuncen. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #53121 +/- ##
================================================
+ Coverage 72.4716% 75.5631% +3.0915%
================================================
Files 1491 1519 +28
Lines 429012 449567 +20555
================================================
+ Hits 310912 339707 +28795
+ Misses 98878 88682 -10196
- Partials 19222 21178 +1956
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Yu Juncen <[email protected]>
… functions Signed-off-by: Yu Juncen <[email protected]>
var changefeedMsgBuf strings.Builder | ||
changefeedMsgBuf.WriteString("found CDC changefeed(s): ") | ||
for clusterID, changefeedID := range s.changefeeds { | ||
changefeedMsgBuf.WriteString("cluster/namespace: ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace is a part of changefeed ID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I'm going to try keep the old output format. Some of test cases rely on it.
pkg/util/cdcutil/cdc.go
Outdated
} | ||
switch info.State { | ||
// https://docs.pingcap.com/zh/tidb/stable/ticdc-changefeed-overview | ||
case "error", "failed": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error state still block gc, it's the same with warning
if err := json.Unmarshal(infoResp.Kvs[0].Value, &info); err != nil { | ||
return 0, errors.Trace(err) | ||
} | ||
switch info.State { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore changefeeds in finished
state
Signed-off-by: Yu Juncen <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter, Leavrth, sdojjy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #53131
Problem Summary:
In the current version, we will reject to restore once there is any changefeed.
This is too strict and not pretty friendly to the end user.
What changed and how does it work?
For now, we will only reject to restore when the changefeed:
Check List
Tests
changefeedctl resume -c test
5.Now the BR passed the CDC check (BR still fail due to we are trying to restore to the origin cluster, that is expected.)
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.