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

stop slave; start slave; increments the GTId on a slave

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.4
    • 10.0.5
    • None

    Description

      With a simple test table, shown here on the slave:

      mysql 15:39:00 [PA DEV 002] [eis] [3202]> select * from mfp;
      +------+
      | c1   |
      +------+
      |   11 |
      |   22 |
      |   33 |
      |   44 |
      |   55 |
      +------+
      5 rows in set (0.00 sec)
       
      mysql 15:39:02 [PA DEV 002] [eis] [3202]> delete from mfp;
      Query OK, 5 rows affected (0.00 sec)

      I then also deleted all these rows on the master simply to explore the options for repairing replication using

      SET GLOBAL gtid_slave_pos = 'XXX'

      However, simply stopping and starting the slave ( sometimes twice ) skipped the transactions with no other actions required:

      mysql 15:39:09 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1412 |
      | gtid_current_pos | 3102-223202-1412 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-409  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:40:24 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.01 sec)
       
      mysql 15:45:21 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-410  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:45:24 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.00 sec)
       
      mysql 15:45:28 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-410  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:45:30 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.01 sec)
       
      mysql 15:45:32 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-411  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:45:34 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.01 sec)
       
      mysql 15:45:36 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-411  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:45:37 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.01 sec)
       
      mysql 15:45:39 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-412  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:45:41 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.00 sec)
       
      mysql 15:45:43 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-412  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:45:44 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.00 sec)
       
      mysql 15:45:47 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-413  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:46:23 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.00 sec)
       
      mysql 15:46:26 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-413  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:46:28 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.01 sec)
       
      mysql 15:46:29 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-414  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:46:31 [PA DEV 002] [eis] [3202]> stop slave; start slave;
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.01 sec)
       
      mysql 15:46:39 [PA DEV 002] [eis] [3202]> show variables like "%gtid%";
      +------------------+------------------+
      | Variable_name    | Value            |
      +------------------+------------------+
      | gtid_binlog_pos  | 3102-223202-1413 |
      | gtid_current_pos | 3102-223202-1413 |
      | gtid_domain_id   | 3102             |
      | gtid_seq_no      | 0                |
      | gtid_slave_pos   | 3102-223102-416  |
      | gtid_strict_mode | OFF              |
      +------------------+------------------+
      6 rows in set (0.00 sec)
       
      mysql 15:46:41 [PA DEV 002] [eis] [3202]>

      Attachments

        Activity

          People

            knielsen Kristian Nielsen
            mpattiso Michael Pattison
            Votes:
            1 Vote for this issue
            Watchers:
            4 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.