-
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
Changed FTWRL to produce error #7712
Conversation
/run-all-tests |
@morgo This change may lead to a compatible issue. We need to consider this carefully. |
/run-all-tests tidb-test=pr/626 |
@morgo |
@coocood No. You are correct, it is safe for |
@morgo Should we merge this PR after the PR for mydumper upstream merged? |
LGTM |
@shenli Yes, that would be my preference. The release notes can say minimum mydumper version required. |
It seems that this PR is blocked by mydumper/mydumper#155 |
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
We need to wait for that pr merged? |
@winoros I have a backup plan, which is for these two PRs to merge: |
This PR is now unblocked and Ready for Merge. |
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
What problem does this PR solve?
Many programs use
FLUSH TABLES WITH READ LOCK
(ftwrl) to create a synchronization point between multi-threaded programs. For example, mydumper works like this:Main thread:
FLUSH TABLES WITH READ LOCK;
Worker threads:
START TRANSACTION WITH CONSISTENT SNAPSHOT;
Main thread:
UNLOCK TABLES;
Because FTWRL is parsed but ignored, these programs are not getting a synchronization point, leading to inconsistent backups. The alternatives for these programs are:
What is changed and how it works?
This changes FTWRL to be an error, similar to
KILL x
(not supported, but judged not safe to parse but ignore). An alternative implimentation could be to raise a warning, but error is my first preference.Check List
Tests
Code changes
Side effects
Related changes
Important! This change is not backwards compatible. It will cause an error in existing mydumpers (both upstream and our fork). However, mydumper also checks for warnings: so lessening the severity will not help.
Assuming the mydumper PR is pulled, we should document that TiDB requires a version of mydumper of
X.Y.Z
or greater.