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

@@global.relay_log_purge not per-master, conflicts between different masters in multisource replication

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.0
    • Fix Version/s: 10.0.8
    • Component/s: None
    • Labels:
      None

      Description

      CHANGE MASTER sets @@global.relay_log_purge true or false as needed depending
      on whether RELAY_LOG_FILE and/or RELAY_LOG_POS is used in the command.

      However, with multi-source, this is changed globally, not per-master. This
      means that one CHANGE MASTER command can overwrite the value for
      another. Thus, we may purge relay logs needed by a different master
      connection, or leave dangling relay logs for one that does not need them.

      It seems that @@global.relay_log_purge needs to become a per-master-connection
      value.

      The following test case demonstrates this; mtr will warn that the global
      relay_log_purge value changed even though we manipulated only the 'abc' master connection.

      --source include/not_embedded.inc
      --source include/have_innodb.inc
      --error ER_RELAY_LOG_INIT
      change master 'abc' to relay_log_file='';
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            monty Michael Widenius added a comment -

            There is no reason to change relay_log_purge as part of CHANGE MASTER.
            This is an unwanted side effect that in all like hood the DB didn't want.

            I will fix is so that in 10.0 CHANGE MASTER does not change the global variable RELAY_LOG_PURGE anymore. This will fix this issue.

            Show
            monty Michael Widenius added a comment - There is no reason to change relay_log_purge as part of CHANGE MASTER. This is an unwanted side effect that in all like hood the DB didn't want. I will fix is so that in 10.0 CHANGE MASTER does not change the global variable RELAY_LOG_PURGE anymore. This will fix this issue.
            Hide
            monty Michael Widenius added a comment -

            Fix: Don't change relay_log_purge when doing CHANGE MASTER

            Show
            monty Michael Widenius added a comment - Fix: Don't change relay_log_purge when doing CHANGE MASTER

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                knielsen Kristian Nielsen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m