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

last_commit_pos_offset set to wrong value after binlog rotate in group commit

Details

    Description

      Thanks to Jonas Oreland who found this in the code:

       

      >> > @@ -7387,6 +7434,10 @@
      >> MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
      >> >
      >> > DEBUG_SYNC(leader->thd, "commit_before_get_LOCK_commit_ordered");
      >> > mysql_mutex_lock(&LOCK_commit_ordered);
      >> > + /**
      >> > + * TODO(jonaso): Check with Kristian,
      >> > + * if we rotate:d above, this offset is "wrong"
      >> > + */
      >> > last_commit_pos_offset= commit_offset;
      >>
      >> Agree, good catch, I think.
      >> If we rotate, we already update last_commit_pos_file and _offset. So the code
      >> needs to remember if it rotated, and skip the errorneous offset update in this
      >> case.

      This happens during group commit, if we rotate the binlog as part of the group
      commit due to max binlog file size reached.

      Attachments

        Activity

          knielsen Kristian Nielsen created issue -
          knielsen Kristian Nielsen made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]

          http://lists.askmonty.org/pipermail/commits/2015-February/007463.html

          BTW, this bug only affects non-transactional commits.

          knielsen Kristian Nielsen added a comment - http://lists.askmonty.org/pipermail/commits/2015-February/007463.html BTW, this bug only affects non-transactional commits.
          knielsen Kristian Nielsen made changes -
          Affects Version/s 5.5.42 [ 18102 ]
          knielsen Kristian Nielsen made changes -
          Component/s OTHER [ 10125 ]
          Fix Version/s 5.5.42 [ 18102 ]
          Fix Version/s 10.0 [ 16000 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 5.5.43 [ 18601 ]
          Fix Version/s 5.5.42 [ 18102 ]
          serg Sergei Golubchik made changes -
          Component/s Replication [ 10100 ]
          Component/s OTHER [ 10125 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 58933 ] MariaDB v3 [ 66197 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 66197 ] MariaDB v4 [ 148618 ]

          People

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