Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4.21, 10.5.12
-
None
Description
Howto reproduce:
Lets take a leader - replica cluster on domain 0 on leader of this cluster add extra source of replication on an domain 1 server with a table or database filter. Insert 1 record on domain 0 and insert 1 record on domain 1 on the filter.
Issue:
Switchover is not possible on domain 0 as the gtid_slave_pos on the old leader is increase by the filter but not increase on his replica as not in binlog.
Fixing:
The possible fix should be not to increase gtid_slave_pos and gtid_current_pos when the event is filtered , this would impact reconnect of the replication to refetch prior position to any non filtered replication events . Can slow down the reconnect in case of a majority of filtered events but can be mitigated by having the filtered events in the relay log and check here if the last event is filtered before connection if not it is safe to set slave_pos to the highest gtid in relay log
An other fix would be to write the event in the binlog with an extra flag filtered and stream it to the replica as well , so the position exits and a parameter can be added at any layer of the replication tree to restore those events
replicate-ingore-filters = boolean [ON] don't apply filtered event OFF apply filtered event
Attachments
Issue Links
- relates to
-
MDEV-26706 Enable per table gtid domain_id
- Open