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.
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
executor: support select for update no wait #12775
executor: support select for update no wait #12775
Changes from 4 commits
f242af2
9e8d6cf
70dc1eb
d2bc394
c103a77
b69efa6
3f4205b
d5ef7bf
38c5caf
16616e0
99935c3
34dccb9
a70b11f
5c52dbd
1a4d0b3
4afc621
de469ca
31f2c67
fddc2e8
119a307
09bdcb2
4565b05
7f73591
99bada6
afa7bea
4b3dfce
edcaf66
16b26c4
cd7151a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
if fail happened here,
UpdateTS
will not be updated, and the previous async rollback is possiblely ongoing,still risk that the later
select for update
rollbacked ? @coocoodThere 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 error rarely happens, so even if this happened, the async rollback causes the transaction to fail, it is acceptable.
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.
@tiancaiamao @coocood @jackysp
I'll add and use
getWithRetry
, but I think here still risk withnowait
. User get this statement result error, next statement pessimistic lockgetForUpdateTs
not updated(select for update, update, delete operations), ths "async rollback" risk still exists, how should we process the error here?Or maybe we make rollback sync for "nowait" locked error?
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.
sync rollback may still send duplicated requests 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.
A gentle remind, better code style here is defining a type like this:
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.
Roger, the
uint64
type is used as input param type indoLockKeys
, here to define 2 special case using this param, so they are not defined like above