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

GTID binlog state not recovered if mariadb-bin.state is removed

    XMLWordPrintable

Details

    Description

      When a master server starts up, it needs to initialise the binlog GTID state,
      so that it can log the correct GTID_LIST event at the start of the newly
      created next binlog file and initialise @@gtid_binlog_pos correctly and so on.

      After a normal shutdown, this happens by reading the mariadb-bin.state file.

      After a crash, the last binlog file is marked as crashed, and the binlog GTID
      state is initialised as part of binlog crash recovery.

      However, if a normal shutdown took place (so the last binlog file is not
      marked as crashed), but the mariadb-bin.state file was lost before server
      starts up again, the code currently wrongly initialises the binlog GTID state
      to empty. This is very wrong and can lead to all sorts of problems.

      A typical way to lose the .state file is if the binlogs are copied to a new
      server. But in any case, the server must never knowingly start up with a
      binlog GTID state that is inconsistent with the binlogs actually in use.

      Attachments

        Activity

          People

            knielsen Kristian Nielsen
            knielsen Kristian Nielsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.