Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-253 Multi-source replication
  3. MDEV-562

Multi-source: RESET SLAVE 'name' ALL creates master.info.index file instead of updating multi-master.info

    XMLWordPrintable

    Details

    • Type: Technical task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      After RESET SLAVE 'name' ALL is run, master.info.index file appears in the datadir; and the name of the dropped connection isn't removed from multi-master.info, so the configuration becomes inconsistent (e.g. after restart the server attempts to start the dropped connection, doesn't find its configuration, complains, etc.)

      bzr version-info

      revision-id: monty@askmonty.org-20120928004505-r6ow2t0ccx5m4ead
      date: 2012-09-28 03:45:05 +0300
      build-date: 2012-09-28 07:02:02 +0400
      revno: 3437

      Test case
      (the same test case and its result file are attached. The test should be okay to be put into the multi_source suite as is, but the result file needs to be checked after the bugfix, since I had to modify it manually)

      cat info_logs.test

      --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
       
      --let $datadir = `SELECT @@datadir`
       
      #
      # Check creation and updating of multi-source *info* logs
      #
       
      --echo #
      --echo # List of files matching '*info*' pattern before starting any slaves
      --list_files $datadir *info*
      --echo # End of list
      --echo #
      --echo # Contents of multi-master.info
      --cat_file $datadir/multi-master.info
      --echo # EOF
      --echo #
       
      # Start replication from the first master
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1
      eval change master 'master1' to
      master_port=$SERVER_MYPORT_1,
      master_host='127.0.0.1',
      master_user='root';
       
      start slave 'master1';
      set default_master_connection = 'master1';
      --source include/wait_for_slave_to_start.inc
       
      # Check the files
       
      --echo #
      --echo # List of files matching '*info*' pattern while 'master1' is running
      --list_files $datadir *info*
      --echo # End of list
      --echo #
      --echo # Contents of multi-master.info
      --cat_file $datadir/multi-master.info
      --echo # EOF
      --echo #
       
      # Start replication from the second master
       
      --replace_result $SERVER_MYPORT_2 MYPORT_2
      eval change master 'master2' to
      master_port=$SERVER_MYPORT_2,
      master_host='127.0.0.1',
      master_user='root';
       
      start slave 'master2';
      set default_master_connection = 'master2';
      --source include/wait_for_slave_to_start.inc
       
      # Check the files
       
      --echo #
      --echo # List of files matching '*info*' pattern
      --echo #  while 'master1' and 'master2' are running
      --list_files $datadir *info*
      --echo # End of list
      --echo #
      --echo # Contents of multi-master.info
      --cat_file $datadir/multi-master.info
      --echo # EOF
      --echo #
       
      # Remove master1 configuration
       
      stop slave 'master1';
      set default_master_connection = 'master1';
      --source include/wait_for_slave_to_stop.inc
      reset slave 'master1' all;
       
      # Check the files
       
      --echo #
      --echo # List of files matching '*info*' pattern
      --echo #  after 'master1' was completely reset, 'master2' still running
      --list_files $datadir *info*
      --echo # End of list
      --echo #
      --echo # Contents of multi-master.info
      --cat_file $datadir/multi-master.info
      --echo # EOF
      --echo #
       
      # Start replication from the first master,
      # now with the default empty name
       
      set default_master_connection = '';
      --replace_result $SERVER_MYPORT_1 MYPORT_1
      eval change master to
      master_port=$SERVER_MYPORT_1,
      master_host='127.0.0.1',
      master_user='root';
       
      start slave;
      --source include/wait_for_slave_to_start.inc
       
      # Check the files
       
      --echo #
      --echo # List of files matching '*info*' pattern
      --echo #   while 'master2' and '' are running
      --list_files $datadir *info*
      --echo # End of list
      --echo #
      --echo # Contents of multi-master.info
      --cat_file $datadir/multi-master.info
      --echo # EOF
      --echo #
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
      show full slave status;
       
      # Restart the slave server
       
      --enable_reconnect
      --append_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
      restart
      EOF
      --shutdown_server 60
      --source include/wait_until_connected_again.inc
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
      show full slave status;
       
      # Check the files
       
      --echo #
      --echo # List of files matching '*info*' pattern
      --echo #   after slave server restart
      --echo #   while 'master2' and '' are running
      --list_files $datadir *info*
      --echo # End of list
      --echo #
      --echo # Contents of multi-master.info
      --cat_file $datadir/multi-master.info
      --echo # EOF
      --echo #
       
       
      # Cleanup
       
      stop slave;
      --source include/wait_for_slave_to_stop.inc
       
      set default_master_connection = 'master2';
      stop slave;
      --source include/wait_for_slave_to_stop.inc
       
      --disconnect slave

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.