-
Notifications
You must be signed in to change notification settings - Fork 726
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
dr-autosync: add recover timeout #6295
Conversation
Signed-off-by: disksing <[email protected]>
[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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6295 +/- ##
==========================================
+ Coverage 74.48% 74.51% +0.03%
==========================================
Files 446 446
Lines 48435 48441 +6
==========================================
+ Hits 36076 36095 +19
+ Misses 9182 9159 -23
- Partials 3177 3187 +10
Flags with carried forward coverage won't be shown. Click here to find out more. |
PR needs rebase. 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/test-infra repository. |
close tikv#6988, close tikv#7016 Signed-off-by: husharp <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
@@ -477,7 +488,7 @@ func (m *ModeManager) tickUpdateState() { | |||
m.drSwitchToAsync(storeIDs[primaryUp]) | |||
} | |||
case drStateAsync: | |||
if canSync { | |||
if canSync && m.drDurationSinceAsyncStart() > m.config.DRAutoSync.WaitRecoverTimeout.Duration { |
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.
Is this config only used to switch from async
to syncRecover
?
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.
yes!
@@ -262,7 +263,8 @@ func (m *ModeManager) drSwitchToAsyncWithLock(availableStores []uint64) error { | |||
log.Warn("failed to switch to async state", zap.String("replicate-mode", modeDRAutoSync), errs.ZapError(err)) | |||
return err | |||
} | |||
dr := drAutoSyncStatus{State: drStateAsync, StateID: id, AvailableStores: availableStores} | |||
now := time.Now() |
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.
Do we need to pick it to 6.5 and other branches?
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.
need cherry-pick 6.5. i have added the label
/merge |
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
This pull request has been accepted and is ready to merge. Commit hash: 4cfcdad
|
/merge |
@disksing: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
In response to a cherrypick label: new pull request created to branch |
ref tikv#4399 Signed-off-by: husharp <[email protected]>
close #4939 Signed-off-by: husharp <[email protected]> Co-authored-by: disksing <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ref tikv#4399 Signed-off-by: husharp <[email protected]>
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
ref tikv#4399 Signed-off-by: husharp <[email protected]>
close #4939 Signed-off-by: husharp <[email protected]> Co-authored-by: disksing <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
close #4939 Signed-off-by: husharp <[email protected]> Co-authored-by: disksing <[email protected]>
What problem does this PR solve?
Issue Number: close #4939.
What is changed and how does it work?
add a configuration item to delay dr state switch from async to sync-recover
Check List
Tests
Release note