-
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
bindinfo: physically delete previous binding when recreating a binding #21349
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.
LGTM
@Reminiscent, Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments. See the corresponding SIG page for more information. Related SIG: planner(slack). |
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
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 |
@qw4990 Oops! This PR requires at least 2 LGTMs to merge. The current number of |
PTAL @lzmhhh123 |
/run-all-tests |
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #21466 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Co-authored-by: Kenan Yao <cauchy1992@gmail.com>
What problem does this PR solve?
Issue Number: close #21288
Problem Summary:
Unexpected binding cache if there are concurrent CREATE BINDING on multiple tidb instances.
What is changed and how it works?
What's Changed:
Physically delete previous bindings when recreating a binding, instead of marking them as deleted.
How it Works:
Logical delete may cause unexpected binding caches if there are concurrent CREATE BINDING on multiple tidb instances, because the record with
using
status is not guaranteed to have larger update_time than those records withdeleted
status.Since recreation would always insert a new binding with same fingerprint, this recreation can be synchronized to other tidb instances successfully.
Related changes
Check List
Tests
Side effects
N/A
Release note