-
-
Notifications
You must be signed in to change notification settings - Fork 2k
MDEV-38636 @@sql_slave_skip_counter resets to 1 when skipping events by @@gtid_ignore_duplicates
#4593
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.11
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.
This section is after the block where this driver SQL thread dismisses queues events to its workers.
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.
We might be able to remove the @@gtid_ignore_duplicates code on the Parallel side as well now, but I don’t dare, and so leave it to MDEV-30458 Consolidate Serial Replica to Parallel Replica with 1 Worker Thread.
sql/log_event_server.cc
Outdated
| rli->slave_skip_counter)); | ||
| if ((server_id == global_system_variables.server_id && | ||
| !(rli->replicate_same_server_id || (flags & LOG_EVENT_ACCEPT_OWN_F))) || | ||
| rli->gtid_skip_flag || |
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.
Parallel mode should (at least I expect) handle Relay_log_info::gtid_skip_flag separately, so gtid_skip_flag-skipped events should never reach the amended code.
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.
I replaced Relay_log_info::gtid_skip_flag with rpl_group_info::gtid_ignore_duplicate_state; my expectation still applies.
…s by `@@gtid_ignore_duplicates` MDEV-5804 implemented `@@gtid_ignore_duplicates` on serial replication by overwriting `@@sql_slave_skip_counter` to 1, which MDEV-4937 reënabled in GTID replication. To avoid conflicts at their root, this commit reïmplements `@@gtid_ignore_duplicates` so it no longer depends on `@@sql_slave_skip_counter`. The new implementation is located next to `@@replicate_events_marked_for_skip` and makes use of the existing `rpl_group_info::gtid_ignore_duplicate_state` infrastructure, which was only used for updating states, not by `@@gtid_ignore_duplicates` itself. Reviewed-by: Kristian Nielsen <knielsen@knielsen-hq.org>
@@sql_slave_skip_counterincreases to 1 when skipping events by@@gtid_ignore_duplicates#4585MDEV-5804 implemented
@@gtid_ignore_duplicateson serial replication by overwriting@@sql_slave_skip_counterto 1, which MDEV-4937 reënabled in GTID replication.To avoid conflicts at their root, this commit reïmplements
@@gtid_ignore_duplicatesso it no longer depends on@@sql_slave_skip_counter. The new implementation is located next to@@slave_skip_counterand utilizes the existingrpl_group_info::gtid_ignore_duplicate_stateinfrastructure, which was only used to update states, not by@@gtid_ignore_duplicatesitself.