-
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
*: fix bug that write on temporary table send request to TiKV #25535
*: fix bug that write on temporary table send request to TiKV #25535
Conversation
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.
Can you test it manually, on a real cluster?
Yes, it's when I testing the feature manually that I found this bug. @djshow832 The test case is now changed to cover writing without network (you can check the failpoint). |
[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. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 0dd1714
|
/run-unit-test |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #26516 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.1 in PR #26519 |
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
Write on a temporary table should not send request to TiKV
What is changed and how it works?
What's Changed:
Fix a bug introduced by #24196
I thought remove the temporary KV entries from the transaction buffer could avoid sending request to TiKV.
But I'm wrong. The
membuffer.Delete()
API causes sending delete keys to TiKV ...How it Works:
Now I use the transaction
SetKVFilter()
API to ignore the temporary table KV entries.See https://github.com/tikv/client-go/blob/b9e4cb538f3028c8a3cdaa6d04d6b47e2dcb322c/tikv/2pc.go#L357
Check List
Tests
Release note