Skip to content
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

Remove unnecessary usage of FLUSH TABLES WITH READ LOCK #4849

Merged
merged 1 commit into from
May 7, 2019

Commits on May 6, 2019

  1. Remove unnecessary usage of FLUSH TABLES WITH READ LOCK

    During PlannedReparentShard, the steps vitess takes to get replication position are basically (on the old master):
    1. set @@global.read_only=true
    2. FLUSH TABLES WITH READ LOCK
    3. UNLOCK TABLES
    4. SELECT @@GLOBAL.gtid_executed
    
    Steps 2 and 3 should not be necessary. After setting read_only=true, we should be able to get a consistent gtid_executed position. And FTWRL needs to wait for long running SELECTs to finish, so it seems unnecessarily expensive. By eliminating steps 2 and 3 we could reduce the amount of time that vitess is unable to serve queries.
    
    Signed-off-by: dleibovic <dleibovic@etsy.com>
    dasl- committed May 6, 2019
    Configuration menu
    Copy the full SHA
    790e8fa View commit details
    Browse the repository at this point in the history