Skip to content

GC: remove compact on split#18500

Merged
ti-chi-bot[bot] merged 4 commits intotikv:masterfrom
v01dstar:rm-compact-on-split
Jul 7, 2025
Merged

GC: remove compact on split#18500
ti-chi-bot[bot] merged 4 commits intotikv:masterfrom
v01dstar:rm-compact-on-split

Conversation

@v01dstar
Copy link
Member

@v01dstar v01dstar commented Jun 3, 2025

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

v01dstar added 2 commits May 30, 2025 15:17
Signed-off-by: Yang Zhang <yang.zhang@pingcap.com>
Signed-off-by: Yang Zhang <yang.zhang@pingcap.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 3, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 3, 2025
Signed-off-by: Yang Zhang <yang.zhang@pingcap.com>
@zhangjinpeng87
Copy link
Member

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ BugBot reviewed your changes and found no bugs!


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $10.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@v01dstar v01dstar marked this pull request as ready for review June 24, 2025 18:44
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 24, 2025
@v01dstar v01dstar changed the title Rm compact on split Raftstore: remove compact on split Jun 24, 2025
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/needs-linked-issue do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 24, 2025
Signed-off-by: Yang Zhang <yang.zhang@pingcap.com>
@v01dstar v01dstar changed the title Raftstore: remove compact on split GC: remove compact on split Jul 1, 2025
@hhwyt
Copy link
Contributor

hhwyt commented Jul 4, 2025

bugbot run

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 4, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hbisheng, LykxSassinator

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 lgtm approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 7, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 7, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-07-04 04:27:40.395305296 +0000 UTC m=+1628313.118484279: ☑️ agreed by hbisheng.
  • 2025-07-07 03:06:46.426293963 +0000 UTC m=+1882659.149472945: ☑️ agreed by LykxSassinator.

@ti-chi-bot ti-chi-bot bot merged commit d4db908 into tikv:master Jul 7, 2025
8 checks passed
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Jul 7, 2025
@v01dstar v01dstar added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Jul 21, 2025
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Jul 21, 2025
close tikv#18451

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #18731.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Jul 21, 2025
close tikv#18451

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #18732.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Jul 21, 2025
close tikv#18451

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #18733.
But this PR has conflicts, please resolve them!

ti-chi-bot bot pushed a commit that referenced this pull request Jul 23, 2025
close #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: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Yang Zhang <yang.zhang@pingcap.com>

Co-authored-by: Yang Zhang <yang.zhang@pingcap.com>
v01dstar added a commit to ti-chi-bot/tikv that referenced this pull request Aug 5, 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 added a commit to ti-chi-bot/tikv that referenced this pull request Aug 5, 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 added a commit to ti-chi-bot/tikv that referenced this pull request Sep 16, 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 added a commit to ti-chi-bot/tikv that referenced this pull request Sep 16, 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 added a commit to ti-chi-bot/tikv that referenced this pull request Sep 16, 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 added a commit to ti-chi-bot/tikv that referenced this pull request Sep 16, 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 added a commit to ti-chi-bot/tikv that referenced this pull request Sep 16, 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 added a commit to ti-chi-bot/tikv that referenced this pull request Sep 17, 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>
ti-chi-bot bot pushed a commit that referenced this pull request Sep 17, 2025
close #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>

Co-authored-by: Yang Zhang <yang.zhang@pingcap.com>
v01dstar added a commit to ti-chi-bot/tikv that referenced this pull request Sep 30, 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>
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. lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task::Compact may result in a large number of repeated and useless manual::compact tasks

6 participants