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

Sequence Fails with Galera Version 26.4.16 and later (MariaDB Server 10.6.17) in the Presence of Enabled Streaming Replication

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 10.6.17
    • N/A
    • Galera, Sequences
    • None

    Description

      Select next value from the sequence fails with below error in MariaDB Galera Cluster

       
      ERROR 1235 (42000): This version of MariaDB doesn't yet support 'SEQUENCEs with streaming replication in Galera cluster'
      
      

      Test case :-

       
      MariaDB [test]> show global variables like 'version';
      +---------------+---------------------+
      | Variable_name | Value               |
      +---------------+---------------------+
      | version       | 10.6.17-MariaDB-log |
      +---------------+---------------------+
      1 row in set (0.001 sec)
       
       
      MariaDB [(none)]> SHOW STATUS LIKE 'wsrep_provider_version';
      +------------------------+-------------------+
      | Variable_name          | Value             |
      +------------------------+-------------------+
      | wsrep_provider_version | 26.4.16(r7dce514) |
      +------------------------+-------------------+
      1 row in set (0.001 sec)
       
      MariaDB [(none)]> show global variables like '%wsrep_trx%';
      +-------------------------+----------+
      | Variable_name           | Value    |
      +-------------------------+----------+
      | wsrep_trx_fragment_size | 10240000 |
      | wsrep_trx_fragment_unit | bytes    |
      +-------------------------+----------+
      2 rows in set (0.001 sec)
       
      MariaDB [(none)]> select * from mysql.wsrep_cluster;
      +--------------------------------------+---------+------------+------------------+--------------+
      | cluster_uuid                         | view_id | view_seqno | protocol_version | capabilities |
      +--------------------------------------+---------+------------+------------------+--------------+
      | b47c150a-eb39-11ee-a832-528b77b9f3c4 |      41 |        172 |                4 |       184703 |
      +--------------------------------------+---------+------------+------------------+--------------+
      1 row in set (0.001 sec)
       
      MariaDB [(none)]> select * from mysql.wsrep_cluster_members;
      +--------------------------------------+--------------------------------------+-----------+-----------------------+
      | node_uuid                            | cluster_uuid                         | node_name | node_incoming_address |
      +--------------------------------------+--------------------------------------+-----------+-----------------------+
      | 4227e2e0-0dae-11ef-b33f-878f0cd70cd5 | b47c150a-eb39-11ee-a832-528b77b9f3c4 | gcn-02    | 192.168.47.42:3306    |
      | 84c84e8c-0dae-11ef-aca4-1377bfb10b11 | b47c150a-eb39-11ee-a832-528b77b9f3c4 | gcn-03    | 192.168.47.43:3306    |
      | a664e68f-0dad-11ef-8c20-6249933a39f0 | b47c150a-eb39-11ee-a832-528b77b9f3c4 | gcn-01    | 192.168.47.41:3306    |
      +--------------------------------------+--------------------------------------+-----------+-----------------------+
      3 rows in set (0.001 sec)
       
      MariaDB [(none)]> use test;
      Database changed
       
       
      MariaDB [test]> create sequence test_sequence start with 1 increment by 0;
      Query OK, 0 rows affected (0.015 sec)
       
      MariaDB [test]> select next value for test_sequence;
      ERROR 1235 (42000): This version of MariaDB doesn't yet support 'SEQUENCEs with streaming replication in Galera cluster'
       
      
      

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            tested with:

            --source include/galera_cluster.inc
            --source include/have_innodb.inc
             
            SHOW STATUS LIKE 'wsrep_provider_version';
             
            USE test;
            create sequence test_sequence start with 1 increment by 0;
            select next value for test_sequence;
             
            --echo
            --echo # On node_1
            --connection node_1
            select next value for test_sequence;
             
            --echo
            --echo # On node_2
            --connection node_2
            select next value for test_sequence;
             
            # Cleanup
            DROP SEQUENCE test_sequence;
             
            --source include/galera_end.inc
            --echo # End of test
            

            10.6-4b4db4a8e54480eccfed99fd7e3a8223ec03d1d7

            connection node_2;
            connection node_1;
            SHOW STATUS LIKE 'wsrep_provider_version';
            Variable_name	Value
            wsrep_provider_version	26.4.16(rXXXX)
            USE test;
            create sequence test_sequence start with 1 increment by 0;
            select next value for test_sequence;
            next value for test_sequence
            1
             
            # On node_1
            connection node_1;
            select next value for test_sequence;
            next value for test_sequence
            3
             
            # On node_2
            connection node_2;
            select next value for test_sequence;
            next value for test_sequence
            2002
            DROP SEQUENCE test_sequence;
            disconnect node_2;
            disconnect node_1;
            # End of test
            galera.sequence 'innodb'                 [ pass ]   2052
            

            same result with 10.5-867747204afd4a94885fdbdb2a1442ca35001f93 and bb-10.6-release (887bb3f73555ff8a50138a580ca8308b9b5c069c)

            danblack Daniel Black added a comment - tested with: --source include/galera_cluster.inc --source include/have_innodb.inc   SHOW STATUS LIKE 'wsrep_provider_version';   USE test; create sequence test_sequence start with 1 increment by 0; select next value for test_sequence;   --echo --echo # On node_1 --connection node_1 select next value for test_sequence;   --echo --echo # On node_2 --connection node_2 select next value for test_sequence;   # Cleanup DROP SEQUENCE test_sequence;   --source include/galera_end.inc --echo # End of test 10.6-4b4db4a8e54480eccfed99fd7e3a8223ec03d1d7 connection node_2; connection node_1; SHOW STATUS LIKE 'wsrep_provider_version'; Variable_name Value wsrep_provider_version 26.4.16(rXXXX) USE test; create sequence test_sequence start with 1 increment by 0; select next value for test_sequence; next value for test_sequence 1   # On node_1 connection node_1; select next value for test_sequence; next value for test_sequence 3   # On node_2 connection node_2; select next value for test_sequence; next value for test_sequence 2002 DROP SEQUENCE test_sequence; disconnect node_2; disconnect node_1; # End of test galera.sequence 'innodb' [ pass ] 2052 same result with 10.5-867747204afd4a94885fdbdb2a1442ca35001f93 and bb-10.6-release (887bb3f73555ff8a50138a580ca8308b9b5c069c)
            danblack Daniel Black added a comment -

            galera_sr.MDEV-28971 still passing.

            MDEV-28971 noted the crash that got replaced with an error message.

            So this isn't a regression. Its a new feature, and something that needs to be documented on https://mariadb.com/kb/en/mariadb-galera-cluster-known-limitations/.

            so not a blocker right?

            danblack Daniel Black added a comment - galera_sr. MDEV-28971 still passing. MDEV-28971 noted the crash that got replaced with an error message. So this isn't a regression. Its a new feature, and something that needs to be documented on https://mariadb.com/kb/en/mariadb-galera-cluster-known-limitations/ . so not a blocker right?

            SEQUENCEs were not working well in combination with streaming replication (MDEV-28971). Fixing this properly would require quite a bit of work, including MDEV-32823. It wasn't clear if it was worth doing this. In the end it was decided to disable the combination SEQUENCE + Streaming replication. Hence the error message when you attempt to SELECT NEXT VALUE and streaming replication is enabled.

            sciascid Daniele Sciascia added a comment - SEQUENCEs were not working well in combination with streaming replication ( MDEV-28971 ). Fixing this properly would require quite a bit of work, including MDEV-32823 . It wasn't clear if it was worth doing this. In the end it was decided to disable the combination SEQUENCE + Streaming replication. Hence the error message when you attempt to SELECT NEXT VALUE and streaming replication is enabled.

            according to the previous comment, this behavior is intentional, that is, not a bug.

            serg Sergei Golubchik added a comment - according to the previous comment, this behavior is intentional, that is, not a bug.

            People

              sciascid Daniele Sciascia
              pramod.mahto@mariadb.com Pramod Mahto
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.