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

SST scripts do not take log_bin_index setting into account if it's not in the [mysqld] section

    XMLWordPrintable

    Details

      Description

      With settings like these:

      log-bin                         = /data/mysql/log/hostname-bin
      log-bin-index                   = /data/mysql/log/hostname.bdx
      

      in [server] section of my.cnf, SST fails like this when removing the binary logs:

      ...
      Oct 19 02:59:19 host-galera1 mysqld: removed ‘/data/mysql/log/hostname-bin.000287’
      Oct 19 02:59:19 host-galera1 mysqld: removed ‘/data/mysql/log/hostname-bin.000277’
      Oct 19 02:59:19 host-galera1 mysqld: removed ‘/data/mysql/log/hostname-bin.000281’
      Oct 19 02:59:19 host-galera1 mysqld: rm: cannot remove ‘/data/mysql/log/*.index’: No such file or directory
      ...
      

      Here (mariabackup-based) SST script assumes that binlog index file has extension of .index, instead of reading proper log_bin_index value from the config file. The real index file (hostname.bdx) does not get removed, but all binary logs do.

      Then when SST completes, server is brought up and it reads the name of the binlog index file from [server] section, finding it. But in the index file there are filenames of deleted binary logs which are not found, so server shuts down.

      See GitHub source code:

      https://github.com/MariaDB/server/blob/2897ef099c500f53d4e2b9b162dc9b1c390ae6c4/scripts/wsrep_sst_common.sh#L514

      to find out what only [mysqld] section is checked for binary log related settings, even in current 10.7.

        Attachments

          Activity

            People

            Assignee:
            sysprg Julius Goryavsky
            Reporter:
            valerii Valerii Kravchuk
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.