Skip to content

raftstore: report busy to PD when restarting if exists apply log lags. (#16239)#17329

Closed
ti-chi-bot wants to merge 1 commit intotikv:release-7.1from
ti-chi-bot:cherry-pick-16239-to-release-7.1
Closed

raftstore: report busy to PD when restarting if exists apply log lags. (#16239)#17329
ti-chi-bot wants to merge 1 commit intotikv:release-7.1from
ti-chi-bot:cherry-pick-16239-to-release-7.1

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #16239

What is changed and how it works?

Issue Number: Ref #15874

What's Changed:

This pr used to mitigate the dropping trend when rolling restart TiKV nodes, derived from #11859 and #11921.

This pr inspect the gap of each peer's `applied_log_index` and `commit_log_index` when restarting.

And if the gap exceeds the `leader_transfer_max_log_lag`, the related peer will be marked
as `pending for recovery` state. After the gap is less than `leader_transfer_max_log_lag`,
it means that the pending logs is acceptable.

Only if the count of ready peers exceeds the given configuration, that is,
`min_recovery_ready_region_percent`, this store is ready for re-balancing leaders. Before
this stage, the state of this store will be marked `is_busy` to avoid transferring leaders to it.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

image

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Release note

None.

ref tikv#15874

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added 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-7.1 This PR is cherry-picked to release-7.1 from a source PR. labels Jul 30, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 30, 2024

[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 zhongzc for approval. For more information see the Code Review Process.

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

Details 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

@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved dco-signoff: yes Indicates the PR's author has signed the dco. labels Jul 30, 2024
@ti-chi-bot ti-chi-bot added cherry-pick-approved Cherry pick PR approved by release team. labels Jul 30, 2024
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed do-not-merge/cherry-pick-not-approved size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 30, 2024
@LykxSassinator
Copy link
Contributor

It already contained by #17318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-approved Cherry pick PR approved by release team. dco-signoff: yes Indicates the PR's author has signed the dco. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants