Skip to content

GC: remove compact on split (#18500)#18733

Open
ti-chi-bot wants to merge 1 commit intotikv:release-8.1from
ti-chi-bot:cherry-pick-18500-to-release-8.1
Open

GC: remove compact on split (#18500)#18733
ti-chi-bot wants to merge 1 commit intotikv:release-8.1from
ti-chi-bot:cherry-pick-18500-to-release-8.1

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #18500

What is changed and how it works?

Issue Number: Close #18451

What's Changed:

Remove compaction scheduling on split key not found error. 

Split key not found error is usually returned when a region only has a few keys but a large number of stale MVCC versions.
This was the incentive of scheduling a compaction on split error. However, this solution brings a more serious problem, i.e. worker threads starvation.
We don't really need this extra compaction, we expect that, after the compaction optimization is done, this MVCC accumulation issue would be mitigated. So, once the "split key not found" occurs, we just rely on the CheckThenCompact to resolve 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

Side effects

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

Release note

None

@ti-chi-bot ti-chi-bot added dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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-8.1 This PR is cherry-picked to release-8.1 from a source PR. labels Jul 21, 2025
@ti-chi-bot ti-chi-bot mentioned this pull request Jul 21, 2025
9 tasks
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 21, 2025

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

To merge this cherry pick:

  1. It must be approved by the approvers firstly.
  2. AFTER it has been approved by approvers, please wait for the cherry-pick merging approval from triage owners.
Details

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-sigs/prow repository.

@ti-chi-bot
Copy link
Member Author

@v01dstar This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 21, 2025

@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.

Details

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 bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 21, 2025
@v01dstar v01dstar force-pushed the cherry-pick-18500-to-release-8.1 branch 2 times, most recently from ca9b8c5 to 70fa011 Compare August 5, 2025 18:42
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 5, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: v01dstar

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

The pull request process is described 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 the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 6, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 6, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-08-06 18:06:26.377135019 +0000 UTC m=+464296.519896195: ☑️ agreed by v01dstar.

@ti-chi-bot ti-chi-bot bot added the approved label Aug 6, 2025
close tikv#18451

Remove compaction scheduling on split key not found error.

Split key not found error is usually returned when a region only has a few keys but a large number of stale MVCC versions.
This was the incentive of scheduling a compaction on split error. However, this solution brings a more serious problem, i.e. worker threads starvation.
We don't really need this extra compaction, we expect that, after the compaction optimization is done, this MVCC accumulation issue would be mitigated. So, once the "split key not found" occurs, we just rely on the CheckThenCompact to resolve it.

Signed-off-by: Yang Zhang <yang.zhang@pingcap.com>
@v01dstar v01dstar force-pushed the cherry-pick-18500-to-release-8.1 branch from 70fa011 to 6160325 Compare September 30, 2025 21:19
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 30, 2025

@ti-chi-bot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-check-deps 6160325 link true /test pull-check-deps
pull-unit-test 6160325 link true /test pull-unit-test

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

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

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. 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. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. 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-8.1 This PR is cherry-picked to release-8.1 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants