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

            People

            • Assignee:
              knielsen Kristian Nielsen
              Reporter:
              knielsen Kristian Nielsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: