-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: Fix the issue that context canceled error during commit RPC is not treated as undetermined error (#20857) #20925
store/tikv: Fix the issue that context canceled error during commit RPC is not treated as undetermined error (#20857) #20925
Conversation
/run-all-tests |
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
f72b0b4
to
48a2dcf
Compare
LGTM |
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 |
Sorry @cfzjywxk, this branch cannot be merged without an approval of release maintainers |
Never mind, my issue is related to this TODO: Line 1028 in 1702608
|
/approve |
/merge |
/run-all-tests |
cherry-pick #20857 to release-4.0
What problem does this PR solve?
Issue Number: close #20733
#20030 introduced an issue: When a transaction's commit request to primary gets an context canceled error during RPC, it's returned early without setting the sender's
rpcError
field, however 2pc committer need to check that field to check if the transaction should be in undetermined state. In this case, we don't know if TiKV have received and handled the request successfully, so it should be undetermined. The problem also exists when context canceled occurs during prewrite requests of async commit transactions.What is changed and how it works?
This PR moves the
s.rpcError = err
statement before returning context error, and adds some failpoint tests. However I think my tests are too tricky and I didn't find better way..Related changes
Check List
Tests
Side effects
-
Release note