-
Notifications
You must be signed in to change notification settings - Fork 283
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
checker(dm): add downstream CDC/PiTR check for lightning #7839
Conversation
Signed-off-by: lance6716 <lance6716@gmail.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: lance6716 <lance6716@gmail.com>
also check the effects of |
/cc @GMHDBJD |
Signed-off-by: lance6716 <lance6716@gmail.com>
dm/pkg/checker/lightning.go
Outdated
// NewLightningSortingSpaceChecker creates a new LightningSortingSpaceChecker. | ||
func NewLightningSortingSpaceChecker(lightningChecker restore.PrecheckItem) RealChecker { | ||
return &LightningSortingSpaceChecker{inner: lightningChecker} | ||
// NewLightningCDCPiTRChecker creates a new LightningClusterVersionChecker. |
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.
// NewLightningCDCPiTRChecker creates a new LightningClusterVersionChecker. | |
// NewLightningCDCPiTRChecker creates a new LightningCDCPiTRChecker. |
func NewLightningCDCPiTRChecker(lightningChecker restore.PrecheckItem) RealChecker { | ||
c, ok := lightningChecker.(*restore.CDCPITRCheckItem) | ||
if ok { | ||
c.Instruction = "physical import mode is not compatible with them. Please switch to logical import mode then try again." |
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.
c.Instruction = "physical import mode is not compatible with them. Please switch to logical import mode then try again." | |
c.Instruction = "there are running CDC or PiTR, physical import mode is not compatible with them. Please switch to logical import mode then try again." |
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.
The detailed message (CDC or PiTR) is printed at lightning checker's side, like
"found PiTR log streaming task(s): [br_name],\n"+
"found CDC capture(s): clusterID: <nil> captureID(s): [f14cb04d-5ba1-410e-a59b-ccd796920e9d],\n"+
"local backend is not compatible with them. Please switch to tidb backend then try again."
no need to repeat again
@@ -42,7 +42,7 @@ const ( | |||
LightningRegionDistributionChecking = "region_distribution" | |||
LightningDownstreamVersionChecking = "downstream_version" | |||
LightningFreeSpaceChecking = "free_space" | |||
LightningSortingSpaceChecking = "enough_sorting_space" |
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.
not needed?
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.
seem duplicate with free_space
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.
"sorting space" is a property of DM worker, but precheck is done at DM master. I forget this limit
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.
rest lgtm
@@ -42,7 +42,7 @@ const ( | |||
LightningRegionDistributionChecking = "region_distribution" | |||
LightningDownstreamVersionChecking = "downstream_version" | |||
LightningFreeSpaceChecking = "free_space" | |||
LightningSortingSpaceChecking = "enough_sorting_space" |
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.
seem duplicate with free_space
Signed-off-by: lance6716 <lance6716@gmail.com>
/cc @gozssky @dsdashun |
ptal @D3Hunter |
1 similar comment
ptal @D3Hunter |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 479429c
|
@lance6716: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
Signed-off-by: lance6716 lance6716@gmail.com
What problem does this PR solve?
Issue Number: ref #3510
What is changed and how it works?
Also I remove a local disk checking in this PR, because precheck is performed at DM-master and the lightning is run at DM-worker.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note