Skip to content
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

Merged
merged 6 commits into from
Nov 10, 2023

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Apr 10, 2023

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

  • Unit test

Release note

None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 10, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • nolouch

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Apr 10, 2023
@ti-chi-bot ti-chi-bot requested review from nolouch and rleungx April 10, 2023 09:33
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.51%. Comparing base (2c07c24) to head (2daf7e1).
Report is 615 commits behind head on master.

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     
Flag Coverage Δ
unittests 74.51% <75.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 29, 2023
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 14, 2023
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 2, 2023

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>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 8, 2023
@@ -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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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()
Copy link
Contributor

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?

Copy link
Contributor Author

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

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 9, 2023
@disksing disksing added the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Nov 9, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 10, 2023
@nolouch
Copy link
Contributor

nolouch commented Nov 10, 2023

/merge

Copy link
Contributor

ti-chi-bot bot commented Nov 10, 2023

@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 /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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.

Copy link
Contributor

ti-chi-bot bot commented Nov 10, 2023

This pull request has been accepted and is ready to merge.

Commit hash: 4cfcdad

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 10, 2023
@disksing
Copy link
Contributor Author

/merge

Copy link
Contributor

ti-chi-bot bot commented Nov 10, 2023

@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 /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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.

@disksing disksing removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 10, 2023
@ti-chi-bot ti-chi-bot bot merged commit 0c35227 into tikv:master Nov 10, 2023
26 checks passed
@disksing disksing deleted the wait-recover-timeout branch November 10, 2023 04:03
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #7347.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Nov 10, 2023
ti-chi-bot bot added a commit that referenced this pull request Mar 26, 2024
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>
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. labels Nov 6, 2024
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Nov 6, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #8775.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8776.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Nov 6, 2024
ti-chi-bot bot added a commit that referenced this pull request Nov 11, 2024
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>
ti-chi-bot bot pushed a commit that referenced this pull request Dec 5, 2024
close #4939

Signed-off-by: husharp <[email protected]>

Co-authored-by: disksing <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DR Auto-Sync: need a timeout mechanism when DR state changes from async to sync_recover
4 participants