-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Before the successful renaming, a session accessed the ghost table, w… #1536
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
base: master
Are you sure you want to change the base?
Conversation
…hich had already unlocked the original table. There is a very small probability that other sessions dml operations on the original table will occur, and this dml operation will appear in the original table after renaming, resulting in data loss.
@abaowhy Hey, thanks for the bug report and the code changes! 🙇♂️ ❤️ Is there a straightforward way to reproduce this issue? It'd be good to have a test cases that could show that a) this issue exists and b) the proposed code changes fix that issue. 🤔 |
Cutover single testing is quite difficult, so I first provided a picture to illustrate |
It looks similar to this PR #1269 . |
@arthurschreiber I have provided test cases that issue can be stably reproduced on master and fixed in PR. |
@meiji163 I have provided test cases, please take some time to review, and if there are any issues, I will promptly correct them. |
@meiji163 I have fixed three issues during the inspection. Could you please take some time to check again |
@meiji163 @timvaillancourt @rashiq I have provided test cases that issue can be stably reproduced on master and fixed in PR,please take some time to review, and if there are any issues, I will promptly correct them. |
…hich had already unlocked the original table.
Before the successful renaming, a session accessed the ghost table, which had already unlocked the original table.
There is a very small probability that other sessions dml operations on the original table will occur,
and this dml operation will appear in the original table after renaming, resulting in data loss.
https://cloud.tencent.com/developer/article/2303777
A Pull Request should be associated with an Issue.
Related issue: https://github.com/github/gh-ost/issues/0123456789
Description
This PR [briefly explain what it does]
Only when the rename session is waiting for the lock of the original table in performance_schema.metadata_locks, will the lock of the original table be released, and finally rename can be executed. If rename does not wait for the lock, it will exit gh-ost.