-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: refactor the ResolveLocks() function for large transaction's implementation #11999
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b1c67f0
*: implement the CheckTxnStatus API for the large transaction
tiancaiamao 52c1d29
make check
tiancaiamao 299a84e
store/tikv: refactor the ResolveLocks() function for large transactio…
tiancaiamao a4e8c39
Merge branch 'master' into resolve-lock
tiancaiamao 4c6c5c2
tiny cleanup
tiancaiamao db5d7a7
Merge branch 'master' into resolve-lock
tiancaiamao ce3b782
use CheckTxnStatus to implement getTxnStatus
tiancaiamao 5b0a56c
update comment
tiancaiamao d212fbf
Merge branch 'master' into resolve-lock
tiancaiamao 7754fbd
resolve lock for GC
tiancaiamao edc03ff
fix build
tiancaiamao 3c96f57
fix integrated test
tiancaiamao 6da84f7
address comment
tiancaiamao c1fb4a6
address comment
tiancaiamao de4d540
address comment
tiancaiamao 3e1f4a7
address comment
tiancaiamao 4261614
make lint happy
tiancaiamao f45db06
address comment
tiancaiamao cf2127c
Merge branch 'master' into resolve-lock
tiancaiamao d0f6fc5
make CI stable
tiancaiamao f2a887f
address comment
tiancaiamao 2a1d71d
Merge branch 'master' into resolve-lock
sre-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This function need to resolve all locks in
locks
. If some of the locks can't be resolved, this function shouldn't returntrue
.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.
Then large txn would block GC...
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.
To continue GC anyway, you should resolve all the locks before cleaning up the data. Otherwise not-committed secondaries may miss their primary.
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.
You may remove these locks regardless of their TTL (of course, primary first), but you can never leave these locks there.
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.
We may need to update the CmdGCRequest instead of simply leave the lock here.
@coocood
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.
How will GC's logic be? By the way, GC Request is not used by default now.