-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
MDEV-35570 parallel slave ALTER-SEQUNCE attemted to binlog out-of-order #4043
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: 10.6
Are you sure you want to change the base?
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.
Thanks Andrei!
Approved after fixing the correct save/restore of globals in the test case as noted in detailed comments.
Also looks like this needs rebasing before merging to main, there are extra commits included unrelated to this fix.
# | ||
--connection slave | ||
--source include/stop_slave.inc | ||
--let $saved_mode= @@global.slave_parallel_mode |
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.
This looks wrong. The $saved_mode will be a string containing "@@glob...", not the actual value of the slave_parallel_mode which was probably intended.
Use the normal way: SET @saved_mode= @@global.slave_parallel_mode
. This also avoids getting the value into the .result file when restoring, causing the test to fail if run with some non-standard --mysqld=--slave-parallel-mode
option
# allow to proceed to sync with the 1st following WFPT2SC wait condtion | ||
lock table ti write; | ||
# allow to proceed into commit to sync with the 2nd following WFPC wait condition | ||
--let $saved_dbug= @@GLOBAL.debug_dbug |
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.
Again, use: SET @saved_dbug= @@GLOBAL.debug_dbug
…rder _(This is the 1st of two commits to reproduce the issue; the 2nd commits that follow fixes it)_ Since MDEV-31503 fixes ALTER-SEQUENCE might be able to complete its work including binlogging before a preceding in binlog-order transaction. There may not be data dependency between the two transactions, but there would be "an attempt was made to binlog GTID D-S-XYZ which would create an out-of-order sequence number" error in the gtid_strict_mode = ON. After the preceding transaction started committing, and does is very slow, ALTER-SEQUNCE was able to find a time window to complete because it temporarily releases its link with the waitee parent transaction. And while having released it it also erroneously executed binlogging part. Fixed with restoring the commit dependency on the parent before ALTER-SEQUNCE takes on binlogging.
0a08f55
to
f195bef
Compare
The description is copied from the commit message of the initial branch's commit
Since MDEV-31503 fixes ALTER-SEQUENCE might be able to complete its
work including binlogging before a preceding in binlog-order
transaction. There may not be data dependency between the two
transactions, but there would be
"an attempt was made to binlog GTID D-S-XYZ which would create an
out-of-order sequence number"
error in the gtid_strict_mode = ON.
After the preceding transaction started committing, and does is very
slow, ALTER-SEQUNCE was able to find a time window to complete because
it temporarily releases its link with the waitee parent transaction.
And while having released it it also erroneously executed binlogging part.
Fixed with restoring the commit dependency on the parent before
ALTER-SEQUNCE takes on binlogging.