-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Snapshot connection: revert to explicit table locks when FTWRL
is unavailable
#14578
Snapshot connection: revert to explicit table locks when FTWRL
is unavailable
#14578
Conversation
…WITH READ LOCK' is rejected Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
} | ||
query := fmt.Sprintf("lock tables %s", strings.Join(lockClauses, ",")) | ||
if _, err := lockConn.ExecuteFetch(query, 1, false); err != nil { | ||
log.Infof("Error explicitly locking all %v tables", len(lockClauses)) |
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.
Should this log.Errorf
and also print the error as well?
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.
Fixed. Also added check for empty table list.
Signed-off-by: Shlomi Noach <[email protected]>
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.
🎉
…navailable (vitessio#14578) Signed-off-by: Shlomi Noach <[email protected]>
Description
When SnapshotConn needs to run
FLUSH TABLES WITH READ LOCK
(e.g.MoveTables --all-tables
) and the command is rejected (as happens withRDS/Aurora
), SnaposhotConn now reverts to issuing an explicitLOCK TABLES t1 READ, t2 READ, ...
for all base tables.Related Issue(s)
#14577
Checklist
Deployment Notes