Bug #91881 when master crashed and restarted,slave has more data than master sometimes
Submitted: 3 Aug 2018 3:18 Modified: 28 Aug 2018 9:33
Reporter: Pin Lin Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.7.17,8.0. OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[3 Aug 2018 3:18] Pin Lin
Description:
with sync_binlog=1 and innodb_flush_log_at_trx_commit=1, I executed kill -9 on master, and restarted it laster.
I think data on master and slave is consistent,but slave has more data than master in actually.

How to repeat:
starting mysqld1 as master,starting mysqld2 as slave, logining mysqld2 and change master to mysqld1.
ensure thant master run with  sync_binlog=1 and innodb_flush_log_at_trx_commit=1.
start high parallel inserts on master, execute kill -9 to mysqld1 laster.
restart master, some transactions maybe rollback on master, buf still exsists on slave .
[6 Aug 2018 20:25] MySQL Verification Team
Hi,

I cannot reproduce this on any of the current versions on MySQL (8.0.12, 5.7.23).

Can you reproduce this on current version of MySQL?

If you can reproduce, can you please share your full config from both master and slave server.

kind regards
Bogdan
[28 Aug 2018 9:33] Pin Lin
sorry! I did not describe this bug clearly.
When I shutdown master mysqld, first shutdown binlog engine normally, and then shutdown innodb engine. Before flushing redo log to disk, I killed master mysqld. Some Transaction commit tags in redo log buffer were not written to disk.
Then I restart master mysqld,It dosen't recovery from binlog file because It was close normally. Next, Innodb rollbacked theses transactions whoes commit tags were not written to redo log, although theses transactions were written to binlog file and dumped to slave.
when master was started,slave has more data than master.