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

wsrep_sync_wait not enabled when set to 1 in config file

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.15
    • Galera
    • None

    Description

      Setting wsrep_sync_wait to 1 in the config file does not take effect in MariaDB-Galera 10.1.14.

      You also have to set both wsrep_on=ON and wsrep_cluster_address=... (both of which are rather standard for any Galera setup).

      This has been reproduced in MariaDB 10.1.10 and 10.1.14. It supposedly works fine in 10.0.19. You can still set this variable dynamically in 10.1, but that is the only way to get it to remain set to 1.

      [mysqld]
      wsrep_on=ON
      wsrep_sync_wait=1
      wsrep_cluster_address=gcomm://
      

      Start instance with above:

      chris@chris-linux-laptop-64:/etc/init.d$ mysql -uroot -p -e"select @@global.wsrep_sync_wait"
      +--------------------------+
      | @@global.wsrep_sync_wait |
      +--------------------------+
      | 0 |
      +--------------------------+
      

      The change did not take effect.

      However, you can set it dynamically:

      chris@chris-linux-laptop-64:/etc/init.d$ mysql -uroot -p -e"select @@global.wsrep_sync_wait"
      +--------------------------+
      | @@global.wsrep_sync_wait |
      +--------------------------+
      | 0 |
      +--------------------------+
      chris@chris-linux-laptop-64:/etc/init.d$ mysql -uroot -p -e"set @@global.wsrep_sync_wait=1"
      chris@chris-linux-laptop-64:/etc/init.d$ mysql -uroot -p -e"select @@global.wsrep_sync_wait"
      +--------------------------+
      | @@global.wsrep_sync_wait |
      +--------------------------+
      | 1 |
      +--------------------------+
      

      And if you remove wsrep_cluster_address, it will set, thus my.cnf file is now (but this is not really an option for running Galera, it just may help troubleshooting the code):

      [mysqld]
      wsrep_on=ON
      wsrep_sync_wait=1
      

      restart:

      chris@chris-linux-laptop-64:/etc/init.d$ mysql -uroot -p -e"select @@global.wsrep_sync_wait"
      +--------------------------+
      | @@global.wsrep_sync_wait |
      +--------------------------+
      | 1 |
      +--------------------------+
      

      Attachments

        Issue Links

          Activity

            People

              nirbhay_c Nirbhay Choubey (Inactive)
              ccalender Chris Calender (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.