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

Some wsrep provider options only validate the first character of the value when setting it dynamically.

Details

    Description

      Some wsrep provider options only validate the first character of the value when setting it dynamically. This causes the wsrep options to be set to an invalid value and those options in wsrep_provider_options to have a truncated value.

      node2:root@localhost> SET GLOBAL WSREP_PROVIDER_EVS_CAUSAL_KEEPALIVE_PERIOD=Panyvalue;
      Query OK, 0 rows affected (0.000 sec)
       
      node2:root@localhost>
      node2:root@localhost> SELECT @@WSREP_PROVIDER_EVS_CAUSAL_KEEPALIVE_PERIOD;
      +----------------------------------------------+
      | @@WSREP_PROVIDER_EVS_CAUSAL_KEEPALIVE_PERIOD |
      +----------------------------------------------+
      | Panyvalue                                    |
      +----------------------------------------------+
      1 row in set (0.013 sec)
       
      node2:root@localhost>
       
      node2:root@localhost> SET GLOBAL WSREP_PROVIDER_EVS_CAUSAL_KEEPALIVE_PERIOD=anyvalue;
      ERROR 1231 (42000): Variable 'evs_causal_keepalive_period' can't be set to the value of 'anyvalue'
      node2:root@localhost> 
      

      WSREP_PROVIDER_EVS_CAUSAL_KEEPALIVE_PERIOD will have a truncated value in wsrep_provider_options.

      node2:root@localhost> select @@wsrep_provider_options\G
      *************************** 1. row ***************************
      @@wsrep_provider_options: base_dir = /test/mtest/GAL_MD281122-mariadb-10.11.2-linux-x86_64-dbg/node2/; base_host = 127.0.0.1; base_port = 11842; cert.log_conflicts = no; cert.optimistic_pa = yes; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = P; [..]
      

      node2:root@localhost> SET GLOBAL WSREP_PROVIDER_EVS_DELAYED_KEEP_PERIOD=Pdummy;
      Query OK, 0 rows affected (0.001 sec)
       
      node2:root@localhost> select @@WSREP_PROVIDER_EVS_DELAYED_KEEP_PERIOD;
      +------------------------------------------+
      | @@WSREP_PROVIDER_EVS_DELAYED_KEEP_PERIOD |
      +------------------------------------------+
      | Pdummy                                   |
      +------------------------------------------+
      1 row in set (0.000 sec)
       
      node2:root@localhost> SET GLOBAL WSREP_PROVIDER_EVS_DELAYED_KEEP_PERIOD=dummy;
      ERROR 1231 (42000): Variable 'evs_delayed_keep_period' can't be set to the value of 'dummy'
      node2:root@localhost> 
       
      node2:root@localhost> SET GLOBAL WSREP_PROVIDER_EVS_DEBUG_LOG_MASK='1dummy';
      Query OK, 0 rows affected (0.000 sec)
       
      node2:root@localhost> select @@WSREP_PROVIDER_EVS_DEBUG_LOG_MASK;
      +-------------------------------------+
      | @@WSREP_PROVIDER_EVS_DEBUG_LOG_MASK |
      +-------------------------------------+
      | 1dummy                              |
      +-------------------------------------+
      1 row in set (0.031 sec)
       
      node2:root@localhost> SET GLOBAL WSREP_PROVIDER_EVS_DEBUG_LOG_MASK='dummy';
      Query OK, 0 rows affected (0.000 sec)
       
      node2:root@localhost> select @@WSREP_PROVIDER_EVS_DEBUG_LOG_MASK;
      +-------------------------------------+
      | @@WSREP_PROVIDER_EVS_DEBUG_LOG_MASK |
      +-------------------------------------+
      | dummy                               |
      +-------------------------------------+
      1 row in set (0.000 sec)
       
      node2:root@localhost>
      node2:root@localhost> SET GLOBAL WSREP_PROVIDER_EVS_DEBUG_LOG_MASK='ummy';
      ERROR 1231 (42000): Variable 'evs_debug_log_mask' can't be set to the value of 'ummy'
      node2:root@localhost> 
      

      These are the variables that have this issue.

      WSREP_PROVIDER_EVS_CAUSAL_KEEPALIVE_PERIOD
      WSREP_PROVIDER_EVS_DEBUG_LOG_MASK
      WSREP_PROVIDER_EVS_DELAYED_KEEP_PERIOD
      WSREP_PROVIDER_EVS_DELAY_MARGIN
      WSREP_PROVIDER_EVS_INACTIVE_CHECK_PERIOD
      WSREP_PROVIDER_EVS_INACTIVE_TIMEOUT
      WSREP_PROVIDER_EVS_INFO_LOG_MASK
      WSREP_PROVIDER_EVS_INSTALL_TIMEOUT
      WSREP_PROVIDER_EVS_JOIN_RETRANS_PERIOD
      WSREP_PROVIDER_EVS_KEEPALIVE_PERIOD
      WSREP_PROVIDER_EVS_STATS_REPORT_PERIOD
      WSREP_PROVIDER_EVS_SUSPECT_TIMEOUT
      WSREP_PROVIDER_REPL_CAUSAL_READ_TIMEOUT
      

      Attachments

        Issue Links

          Activity

            ramesh Ramesh Sivaraman created issue -
            ramesh Ramesh Sivaraman made changes -
            Field Original Value New Value

            Similarly WSREP_PROVIDER GCS_FC_LIMIT does not allow setting value in kilobyte format.

            node1:root@localhost> set global WSREP_PROVIDER_GCS_FC_LIMIT=1K;
            ERROR 1232 (42000): Incorrect argument type to variable 'wsrep_provider_gcs_fc_limit'
            node1:root@localhost> 
            

            It was permissible to set the value through wsrep_provider_options

            10.9.5-opt>SET GLOBAL wsrep_provider_options="gcs.fc_limit=1K";
            Query OK, 0 rows affected (0.000 sec)
             
            10.9.5-opt>select @@wsrep_provider_options\G
            *************************** 1. row ***************************
            @@wsrep_provider_options: [..]gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 1K; gcs.fc_master_slave = no;[..]
            1 row in set (0.000 sec)
             
            10.9.5-opt>
            
            

            ramesh Ramesh Sivaraman added a comment - Similarly WSREP_PROVIDER GCS_FC_LIMIT does not allow setting value in kilobyte format. node1:root@localhost> set global WSREP_PROVIDER_GCS_FC_LIMIT=1K; ERROR 1232 (42000): Incorrect argument type to variable 'wsrep_provider_gcs_fc_limit' node1:root@localhost> It was permissible to set the value through wsrep_provider_options 10.9.5-opt> SET GLOBAL wsrep_provider_options= "gcs.fc_limit=1K" ; Query OK, 0 rows affected (0.000 sec)   10.9.5-opt> select @@wsrep_provider_options\G *************************** 1. row *************************** @@wsrep_provider_options: [..]gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 1K; gcs.fc_master_slave = no ;[..] 1 row in set (0.000 sec)   10.9.5-opt>
            jplindst Jan Lindström (Inactive) made changes -
            Assignee Jan Lindström [ jplindst ] Daniele Sciascia [ sciascid ]

            This bug is not caused by MDEV-22570. It is already present in current version and can be reproduced using wsrep_provider_options variable:

            SET GLOBAL wsrep_provider_options="evs.causal_keepalive_period=Panyvalue";
            SHOW VARIABLES LIKE 'wsrep_provider_options';                             
            

            results in:

            WSREP_PROVIDER_OPTIONS [...] evs.causal_keepalive_period = P; [...]
            

            The source of the issue has been tracked down in galera library: https://github.com/codership/galera/issues/630

            sciascid Daniele Sciascia added a comment - This bug is not caused by MDEV-22570 . It is already present in current version and can be reproduced using wsrep_provider_options variable: SET GLOBAL wsrep_provider_options="evs.causal_keepalive_period=Panyvalue"; SHOW VARIABLES LIKE 'wsrep_provider_options'; results in: WSREP_PROVIDER_OPTIONS [...] evs.causal_keepalive_period = P; [...] The source of the issue has been tracked down in galera library: https://github.com/codership/galera/issues/630
            serg Sergei Golubchik made changes -
            Affects Version/s 11.0.0 [ 28500 ]
            Affects Version/s 10.11 [ 27614 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.0 [ 28320 ]
            Fix Version/s 10.11 [ 27614 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            ramesh Ramesh Sivaraman made changes -
            Affects Version/s 10.4 [ 22408 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.7 [ 24805 ]
            Affects Version/s 10.8 [ 26121 ]
            Affects Version/s 10.9 [ 26905 ]
            Affects Version/s 10.10 [ 27530 ]
            Affects Version/s 10.11 [ 27614 ]
            ramesh Ramesh Sivaraman made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.10 [ 27530 ]
            Fix Version/s 10.11 [ 27614 ]

            This issue is fixed in the latest Galera revision

            10.6.12-dbg>SET GLOBAL wsrep_provider_options="evs.causal_keepalive_period=Panyvalue";
            ERROR 1210 (HY000): Incorrect arguments to SET
            10.6.12-dbg>
             
            Commit info
            -------------------
            commit 06a0c28592fb5c7b21413d922b1671cc070ab4c6 (grafted, HEAD -> mariadb-4.x, origin/mariadb-4.x)
            Author: Jan Lindström <jan.lindstrom@mariadb.com>
            Date:   Fri Jan 27 07:46:18 2023 +0200
             
                Merge branch wsrep/4.ee into mariadb-4.x
            
            

            ramesh Ramesh Sivaraman added a comment - This issue is fixed in the latest Galera revision 10.6.12-dbg> SET GLOBAL wsrep_provider_options= "evs.causal_keepalive_period=Panyvalue" ; ERROR 1210 (HY000): Incorrect arguments to SET 10.6.12-dbg>   Commit info ------------------- commit 06a0c28592fb5c7b21413d922b1671cc070ab4c6 (grafted, HEAD -> mariadb-4.x, origin/mariadb-4.x) Author: Jan Lindström <jan.lindstrom@mariadb.com> Date : Fri Jan 27 07:46:18 2023 +0200   Merge branch wsrep/4.ee into mariadb-4.x
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.7 [ 24805 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Assignee Daniele Sciascia [ sciascid ] Julius Goryavsky [ sysprg ]

            ralf.gebhardt This fix is released on Galera library 26.4.14. In my understanding it is not fixed on 25.3.x.

            janlindstrom Jan Lindström added a comment - ralf.gebhardt This fix is released on Galera library 26.4.14. In my understanding it is not fixed on 25.3.x.

            Already fixed with Galera 26.4.14 and current wsrep-lib

            sysprg Julius Goryavsky added a comment - Already fixed with Galera 26.4.14 and current wsrep-lib
            sysprg Julius Goryavsky made changes -
            Fix Version/s 10.4.29 [ 28510 ]
            Fix Version/s 10.5.20 [ 28512 ]
            Fix Version/s 10.6.13 [ 28514 ]
            Fix Version/s 10.8.8 [ 28518 ]
            Fix Version/s 10.9.6 [ 28520 ]
            Fix Version/s 10.10.4 [ 28522 ]
            Fix Version/s 10.11.3 [ 28524 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.10 [ 27530 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.0 [ 28320 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

              sysprg Julius Goryavsky
              ramesh Ramesh Sivaraman
              Votes:
              0 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.