Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26632

multi source replication filters breaking GTID semantic

    XMLWordPrintable

Details

    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

          Activity

            People

              knielsen Kristian Nielsen
              stephane@skysql.com VAROQUI Stephane
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.