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

Alter Sequence do not replicate to another nodes with in Galera Cluster

Details

    Description

      Generally ALTER SEQUENCE allows one to change any values for a SEQUENCE created with CREATE SEQUENCE.

      https://mariadb.com/kb/en/library/alter-sequence/

      While within Galera Cluster , ALTER SEQUENCE is only effective on Master node where it got executed , doesn't get replicated to another node of Galera cluster.

      On Node-01 :

       
      MariaDB [test]>  SHOW CREATE SEQUENCE seq;
      +-------+----------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                   |
      +-------+----------------------------------------------------------------------------------------------------------------+
      | seq   | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
      +-------+----------------------------------------------------------------------------------------------------------------+
      1 row in set (0.001 sec)
      
      

      On Node-01

       
      MariaDB [test]> ALTER SEQUENCE  seq MAXVALUE = 10000 ;
      Query OK, 0 rows affected (0.001 sec)
       
       
      MariaDB [test]> SHOW CREATE SEQUENCE seq;
      +-------+--------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                 |
      +-------+--------------------------------------------------------------------------------------------------------------+
      | seq   | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 10000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
      +-------+--------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      
      

      On Node-02

       
      MariaDB [test]>  SHOW CREATE SEQUENCE seq;
      +-------+----------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                   |
      +-------+----------------------------------------------------------------------------------------------------------------+
      | seq   | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
      +-------+----------------------------------------------------------------------------------------------------------------+
      1 row in set (0.001 sec)
      
      

      On Node-03

       
      MariaDB [test]>  SHOW CREATE SEQUENCE seq;
      +-------+----------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                   |
      +-------+----------------------------------------------------------------------------------------------------------------+
      | seq   | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
      +-------+----------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      
      

      While DROP SEQUENCE is working fine, gets replicated across the nodes with in Galera Cluster.

      Attachments

        Activity

          I want more clarity to this issue as sequence object is not InnoDB object, this means that some operations do not replicate on Galera. If we want them to replicate I think we need a new feature development. Actual first DDL i.e. create should replicate already but after that depends.

          jplindst Jan Lindström (Inactive) added a comment - I want more clarity to this issue as sequence object is not InnoDB object, this means that some operations do not replicate on Galera. If we want them to replicate I think we need a new feature development. Actual first DDL i.e. create should replicate already but after that depends.

          jplindst, a sequence object can very well be stored in InnoDB. It is a special kind of table, which does not support locking or undo logging, but only crash safety via the redo log. The persistent state of the sequence is stored in the single row of the special table.

          marko Marko Mäkelä added a comment - jplindst , a sequence object can very well be stored in InnoDB. It is a special kind of table, which does not support locking or undo logging, but only crash safety via the redo log. The persistent state of the sequence is stored in the single row of the special table.

          People

            jplindst Jan Lindström (Inactive)
            pramod.mahto@mariadb.com Pramod Mahto
            Votes:
            0 Vote for this issue
            Watchers:
            10 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.