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/tikv: implement a ttlManager to update the TTL of a transaction #12177

Merged
merged 41 commits into from
Sep 25, 2019

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

In the pessimistic transaction and the large transaction, we should update the TTL of the lock.

What is changed and how it works?

Implement a ttlManager and use it in the pessimistic lock.
The ttlManager will spawn a goroutine to update the TTL of the primary lock periodically.

Check List

Tests

  • Unit test

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Write release note for bug-fix or new feature.

@tiancaiamao
Copy link
Contributor Author

PTAL @coocood @MyonKeminta

@tiancaiamao
Copy link
Contributor Author

/run-unit-test

1 similar comment
@tiancaiamao
Copy link
Contributor Author

/run-unit-test

store/tikv/2pc.go Outdated Show resolved Hide resolved
store/tikv/2pc.go Outdated Show resolved Hide resolved
store/tikv/2pc.go Outdated Show resolved Hide resolved
@coocood
Copy link
Member

coocood commented Sep 25, 2019

LGTM

Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

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

rest LGTM

@tiancaiamao
Copy link
Contributor Author

PTAL @lysu

@tiancaiamao
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu lysu added the status/LGT2 Indicates that a PR has LGTM 2. label Sep 25, 2019
@lysu lysu added the status/can-merge Indicates a PR has been approved by a committer. label Sep 25, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 25, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Sep 25, 2019

@tiancaiamao merge failed.

@tiancaiamao
Copy link
Contributor Author

/run-unit-test

@tiancaiamao tiancaiamao merged commit fef1eac into pingcap:master Sep 25, 2019
@tiancaiamao tiancaiamao deleted the ttl-keep-alive branch September 25, 2019 08:33
@sre-bot
Copy link
Contributor

sre-bot commented Sep 25, 2019

cherry pick to release-3.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tikv status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants