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

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

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

          knielsen Kristian Nielsen created issue -
          knielsen Kristian Nielsen made changes -
          Field Original Value New Value
          Fix Version/s 10.0 [ 16000 ]
          knielsen Kristian Nielsen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          knielsen Kristian Nielsen made changes -
          Fix Version/s 10.0 [ 16000 ]
          knielsen Kristian Nielsen made changes -
          Component/s Replication [ 10100 ]
          Fix Version/s 10.0.17 [ 18300 ]
          Fix Version/s 10.0 [ 16000 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 48410 ] MariaDB v3 [ 62943 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 62943 ] MariaDB v4 [ 147994 ]

          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.