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

pkg/lightning: retry individual scatter region (#46245) #47243

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #46245

What problem does this PR solve?

Issue Number: ref #46203

Problem Summary:
Lightning try to scatter all the regions and at the end it backoff and retry it again. It causes few issues

  1. If we are hiting a store limit, than further scatter regions cause unnecessarily load on PD.
  2. Regions can be skewed as stores are allocated based on number of scatter operation scheduled. It doesn't take into number of scatter operations cancelled because of store limit.

What is changed and how it works?

I am proposing the change similar to tikv go client which doesn't retry and back off after scattering all the regions.

https://github.com/tikv/client-go/blob/a0ac170698524cbf20a869cb3471e969608d599a/tikv/split_region.go#L198

Check List

Tests

  • Manual test (add detailed scripts or steps below)

I tested the similar logic in 6.5 and 6.6 by using the below steps

  1. Set store limit to 16
  2. Parallel import and verify that regions are not skewed

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved labels Sep 25, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 25, 2023

This cherry pick PR is for a release branch and has not yet been approved by release team.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick, it must first be approved by the collaborators.

AFTER it has been approved by collaborators, please ping the release team in a comment to request a cherry pick review.

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.

@ti-chi-bot ti-chi-bot added ok-to-test size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-5.4 This PR is cherry-picked to release-5.4 from a source PR. labels Sep 25, 2023
@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 Sep 25, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 25, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign c4pt0r for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@D3Hunter
Copy link
Contributor

D3Hunter commented May 9, 2024

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 9, 2024
@D3Hunter
Copy link
Contributor

D3Hunter commented May 9, 2024

closed due to #46203 (comment)

@D3Hunter D3Hunter closed this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/cherry-pick-not-approved do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test 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. type/cherry-pick-for-release-5.4 This PR is cherry-picked to release-5.4 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants