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

Replication Inconsistent with IGNORE_DOMAIN_IDS and MASTER_POS_WAIT()




      When using CHANGE MASTER TO IGNORE_DOMAIN_IDS=(ign_gtids), using master_pos_wait(), which uses binlog coordinates rather than GTIDs, transactiions which were already ignored by the slave can be re-executed, if the ignored_domain_ids removes previously ignored domains. That is, if a connection issues master_pos_wait() to wait on the coordinates of an ignored-by-domain-id transaction, and the slave is immediately stopped (just STOP SLAVE is enough, the server doesn't need to be restarted), the replica's gtid_slave_pos state may or may not contain the GTID of the ignored transaction. The effect of this is that, if that domain_id is removed from the IGNORE_DOMAIN_IDS list and the slave is restarted, it may or may not fetch and execute that previously ignored transaction.

      This is due to an inconsistency in setting the replication state when encountering an ignored transaction. The IO thread sets the binlog coordinates state immediately upon seeing an ignored transaction, whereas the SQL thread updates the GTID state. If the slave is stopped in-between these updates, they become out of sync.

      This is highlighted by the test failures reported in MDEV-10684 and MDEV-14357.


        Issue Links



              Unassigned Unassigned
              bnestere Brandon Nesterenko
              0 Vote for this issue
              2 Start watching this issue



                Git Integration

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