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

restore: elision of scattering when max-replica -ge store-count #27483

Merged
merged 11 commits into from
Aug 30, 2021

Conversation

YuJuncen
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #27425

Problem Summary: After retrying failed scatter requests, when max-replica > store-number, it would always fail. A full retry costs about 10+ seconds, which is unacceptable for upon thousands even millions of regions.

What is changed and how it works?

Proposal: xxx

What's Changed:
When max-replica >= store-number, skip scattering, since it is no meaning to scatter in this condition.

How it Works:
So, the retry never happen.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

In a typical TiUP playground (store-count = 1, max-replica = 3):
image
In a testing cluster (store-count = 3, max-replica = 1):
image

Side effects

  • Performance regression: Consumes more Networking (O(1))

Release note

Fix a bug that causes BR get stuck in some of small clusters.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 23, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3pointer
  • kennytm

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 23, 2021
@YuJuncen
Copy link
Contributor Author

/cc kennytm
/cc 3pointer
/sig migrate
/component br

@ti-chi-bot ti-chi-bot added sig/migrate component/br This issue is related to BR of TiDB. labels Aug 23, 2021
@YuJuncen
Copy link
Contributor Author

/run-integration-tests

@kennytm
Copy link
Contributor

kennytm commented Aug 23, 2021

when max-replica == store-count > 1, without scattering there will be a large leader imbalance (though size is balanced). not sure if PD can quickly fix it afterwards.

maybe just skip scatter when max-replica > store-count || store-count = 1?

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

br/pkg/restore/split_client.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 24, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 30, 2021
@YuJuncen
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: e88bc45

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 30, 2021
@ti-chi-bot
Copy link
Member

@YuJuncen: 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.

@ti-chi-bot ti-chi-bot merged commit 986f65c into pingcap:master Aug 30, 2021
@YuJuncen YuJuncen mentioned this pull request Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/migrate size/M Denotes a PR that changes 30-99 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.

br restore database slow and lots of "scatter region failed, retring" in log when stores less then replica
4 participants