[MDEV-19353] Alter Sequence do not replicate to another nodes with in Galera Cluster Created: 2019-04-29  Updated: 2022-01-10  Resolved: 2022-01-10

Status: Closed
Project: MariaDB Server
Component/s: Galera, Sequences
Affects Version/s: None
Fix Version/s: 10.4.23, 10.5.14, 10.6.6, 10.7.2

Type: Bug Priority: Major
Reporter: Pramod Mahto Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: feature_request


 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.



 Comments   
Comment by Jan Lindström (Inactive) [ 2020-07-20 ]

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.

Comment by Marko Mäkelä [ 2021-09-29 ]

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.

Generated at Thu Feb 08 08:51:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.