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

EVENT can be SLAVESIDE_DISABLED on all nodes after Galera SST

    XMLWordPrintable

    Details

      Description

      In MariaDB Galera Cluster, when node which is "owner" of EVENT gets executed fine and that EVENT is SLAVESIDE_DISABLED on other nodes of cluster which seems correct.
      However, when somehow "owner" of the EVENT node gets SST from other nodes of cluster then event status becomes SLAVESIDE_DISABLED too which seems incorrect.
      It should get status back to ENABLED on SST on "originating" node of EVENT.

      I think event status should be updated accordingly when mysqld starts up and load events and check originator of event via server_id may be.

      [root@galera-node-3 /]#
      MariaDB [test]> CREATE TABLE `t1` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `time` datetime DEFAULT NULL,  PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
      Query OK, 0 rows affected (0.03 sec)
       
      MariaDB [test]> CREATE EVENT e_min ON SCHEDULE EVERY 1 MINUTE DO INSERT INTO test.t1 values (null,now());
      Query OK, 0 rows affected (0.01 sec)
       
      MariaDB [test]> show events\G
      *************************** 1. row ***************************
                        Db: test
                      Name: e_min
                   Definer: root@localhost
                 Time zone: SYSTEM
                      Type: RECURRING
                Execute at: NULL
            Interval value: 1
            Interval field: MINUTE
                    Starts: 2019-04-03 19:42:46
                      Ends: NULL
                    Status: ENABLED
                Originator: 0
      character_set_client: utf8
      collation_connection: utf8_general_ci
        Database Collation: latin1_swedish_ci
      1 row in set (0.00 sec)
       
      MariaDB [test]> select * from t1;
      +----+---------------------+
      | id | time                |
      +----+---------------------+
      |  6 | 2019-04-03 19:49:46 |
      |  9 | 2019-04-03 19:50:31 |
      | 12 | 2019-04-03 19:51:31 |
      +----+---------------------+
      3 rows in set (0.00 sec)
       
      [root@galera-node-2 /]#
      MariaDB [test]> show events\G
      *************************** 1. row ***************************
                        Db: test
                      Name: e_min
                   Definer: root@localhost
                 Time zone: SYSTEM
                      Type: RECURRING
                Execute at: NULL
            Interval value: 1
            Interval field: MINUTE
                    Starts: 2019-04-03 19:42:46
                      Ends: NULL
                    Status: SLAVESIDE_DISABLED
                Originator: 0
      character_set_client: utf8
      collation_connection: utf8_general_ci
        Database Collation: latin1_swedish_ci
      1 row in set (0.00 sec)
       
      [root@galera-node-1 /]#
      MariaDB [test]> show events\G
      *************************** 1. row ***************************
                        Db: test
                      Name: e_min
                   Definer: root@localhost
                 Time zone: SYSTEM
                      Type: RECURRING
                Execute at: NULL
            Interval value: 1
            Interval field: MINUTE
                    Starts: 2019-04-03 19:42:46
                      Ends: NULL
                    Status: SLAVESIDE_DISABLED
                Originator: 0
      character_set_client: utf8
      collation_connection: utf8_general_ci
        Database Collation: latin1_swedish_ci
      1 row in set (0.01 sec)
       
      Now, trigger SST on node3 which is "owner" of event.
       
      [root@galera-node-3 mysql]# rm -fr *
      [root@galera-node-3 mysql]# /etc/init.d/mysql start
      Starting MySQL.190403 19:55:16 mysqld_safe Logging to '/var/lib/mysql/galera-node-3.err'.
      190403 19:55:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
      ....... SUCCESS! 
       
      MariaDB [test]> show events\G
      *************************** 1. row ***************************
                        Db: test
                      Name: e_min
                   Definer: root@localhost
                 Time zone: SYSTEM
                      Type: RECURRING
                Execute at: NULL
            Interval value: 1
            Interval field: MINUTE
                    Starts: 2019-04-03 19:50:31
                      Ends: NULL
                    *Status: SLAVESIDE_DISABLED*
                Originator: 0
      character_set_client: utf8
      collation_connection: utf8_general_ci
        Database Collation: latin1_swedish_ci
      1 row in set (0.00 sec)
      

        Attachments

          Activity

            People

            Assignee:
            jplindst Jan Lindström
            Reporter:
            muhammad.irfan Muhammad Irfan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: