Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2325

Disabled events are enabled on promoted slave upon failover

    XMLWordPrintable

Details

    • MXS-SPRINT-76, MXS-SPRINT-77

    Description

      Upon a master failure, all enabled and disabled events on the promoted slave will be enabled.

      Per the manual:
      https://mariadb.com/kb/en/mariadb-maxscale-23-mariadb-monitor/#handle_server_events

      On Master:

      MariaDB [(none)]> use test;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
       
      Database changed
      MariaDB [test]> show events;
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+---------+------------+----------------------+----------------------+--------------------+
      | Db   | Name       | Definer        | Time zone | Type     | Execute at          | Interval value | Interval field | Starts | Ends | Status  | Originator | character_set_client | collation_connection | Database Collation |
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+---------+------------+----------------------+----------------------+--------------------+
      | test | test_event | root@localhost | SYSTEM    | ONE TIME | 2019-02-11 16:28:47 | NULL           | NULL           | NULL   | NULL | ENABLED |          1 | latin1               | latin1_swedish_ci    | latin1_swedish_ci  |
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+---------+------------+----------------------+----------------------+--------------------+
      1 row in set (0.001 sec)
      

      ****************************************
      Disable event on master
      ****************************************

      MariaDB [test]> alter event test_event disabled;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'disabled' at line 1
      MariaDB [test]> alter event test_event disable;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [test]> show events;
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+----------+------------+----------------------+----------------------+--------------------+
      | Db   | Name       | Definer        | Time zone | Type     | Execute at          | Interval value | Interval field | Starts | Ends | Status   | Originator | character_set_client | collation_connection | Database Collation |
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+----------+------------+----------------------+----------------------+--------------------+
      | test | test_event | root@localhost | SYSTEM    | ONE TIME | 2019-02-11 16:28:47 | NULL           | NULL           | NULL   | NULL | DISABLED |          1 | latin1               | latin1_swedish_ci    | latin1_swedish_ci  |
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+----------+------------+----------------------+----------------------+--------------------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> exit;
      Bye
      

      ******************************************************
      On the slave the state stays the same
      ******************************************************

      [root@24f0e1ed4599 ~]# mysql -u root -P33062
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 14
      Server version: 10.3.11-MariaDB-log MariaDB Server
       
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> use test;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
       
      Database changed
      MariaDB [test]> show events;
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+--------------------+------------+----------------------+----------------------+--------------------+
      | Db   | Name       | Definer        | Time zone | Type     | Execute at          | Interval value | Interval field | Starts | Ends | Status             | Originator | character_set_client | collation_connection | Database Collation |
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+--------------------+------------+----------------------+----------------------+--------------------+
      | test | test_event | root@localhost | SYSTEM    | ONE TIME | 2019-02-11 16:28:47 | NULL           | NULL           | NULL   | NULL | SLAVESIDE_DISABLED |          1 | latin1               | latin1_swedish_ci    | latin1_swedish_ci  |
      +------+------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+--------------------+------------+----------------------+----------------------+--------------------+
      1 row in set (0.001 sec)
      

      ************************************************************
      Upon failover this event would be enable which could cause problems.
      ************************************************************

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            kjoiner Kyle Joiner (Inactive)
            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.