[MDEV-7310] last_commit_pos_offset set to wrong value after binlog rotate in group commit Created: 2014-12-12  Updated: 2015-03-02  Resolved: 2015-02-24

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 5.5.42, 10.0.15
Fix Version/s: 5.5.43

Type: Bug Priority: Major
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: groupcommit, replication


 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.



 Comments   
Comment by Kristian Nielsen [ 2015-02-23 ]

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

BTW, this bug only affects non-transactional commits.

Generated at Thu Feb 08 07:18:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.