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

store/gc_worker: Implement adaptive GC safePoint (#16550) #16757

Merged

Conversation

MyonKeminta
Copy link
Contributor

Cherry picks #16550


What problem does this PR solve?

Problem Summary: This PR implements self-adaptive safePoint. After this change, every service upon TiKV (including TiDB) may set its own service safePoint, which means how much data key want to retain after GC. After finishing resolveLocks phase, TiDB's GCWorker will update TiDB's service safePoint and then get the minimal service safePoints among all services, and use it to do the data cleanup.

What is changed and how it works?

What's Changed:
Added a step that tries to update service safePoint and use the minimal service safePoint (if any) to do data clean up work.

Related changes

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

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • Breaking backward compatibility
    • RunGCJob API changed and added an pd parameter which is required to update service safePoint.

Release note

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@bb7133 bb7133 added status/LGT1 Indicates that a PR has LGTM 1. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 23, 2020
@bb7133 bb7133 added the status/can-merge Indicates a PR has been approved by a committer. label Apr 23, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 23, 2020

/run-all-tests

@sre-bot sre-bot merged commit d14972d into pingcap:release-4.0 Apr 23, 2020
@MyonKeminta MyonKeminta deleted the m/cherry-pick-adaptive-safepoint branch April 23, 2020 10:20
@crazycs520 crazycs520 modified the milestones: v4.0.0-rc.2, v4.0.0-rc.1 Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config component/GC status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants