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
domain,server,session: optimize gc safepoint advancing for internal transaction #32726
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/4064ae46eaccec40859cb753bf73d79079dcc36e |
c760ca4
to
355a66a
Compare
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
/run-check_title |
acd0bee
to
4a08f56
Compare
/run-check_dev |
@cfzjywxk @MyonKeminta @youjiali1995 @sticnarf @you06 ,thanks !! |
37ef59d
to
2996aa4
Compare
7fe9381
to
d804494
Compare
Co-authored-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Co-authored-by: Lei Zhao <zlwgx1023@gmail.com>
2.rwmutex to mutext Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Signed-off-by: TonsnakeLin <lpbgytong@163.com>
d11246c
to
98ffcc8
Compare
Signed-off-by: TonsnakeLin <lpbgytong@163.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 539fe82
|
/merge |
/run-unit-test |
@TonsnakeLin: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
Signed-off-by: TonsnakeLin lpbgytong@163.com
What problem does this PR solve?
TiDB advances gc safepoint every tidb_gc_run_interval time with step tidb_gc_life_time. If there is a long time transaction from user client lives more than tidb_gc_life_time, the safpoint can't be advanced until the long transaction is finished or lives than 24h. This mechanism ensures the continuous advancement of gc safepoint and ensures that the data that active transactions need to access will not be cleared.
However, Internal transactions run in TiDB don't comply with the mechanism above. If the internal transaction lives more than tidb_gc_life_time, maybe failed because the data it needs to access was cleared. This PR is used to solve the problem that internal transactions run in TiDB may be executed failed because the accessed data was cleared.
Issue Number: close #32725
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Release note