Description:
I encounter an issue in our production environment.
Although set slave_preserve_commit_order=1 in master/slave instance, We still encounter gtid disorder in Slave
In master's binlog we find the gtid sequence
15959d02-136e-11e9-a1e5-ac751d25dbc3:68690512:last_committed=1143 sequence_number=1144
15959d02-136e-11e9-a1e5-ac751d25dbc3:68690513 :last_committed=1144 sequence_number=1145
15959d02-136e-11e9-a1e5-ac751d25dbc3:68690514:last_committed=1144 sequence_number=1146
In slave's binlog
15959d02-136e-11e9-a1e5-ac751d25dbc3:68690512:last_committed=1143 sequence_number=1144
15959d02-136e-11e9-a1e5-ac751d25dbc3:68690514:last_committed=1144 sequence_number=1145
15959d02-136e-11e9-a1e5-ac751d25dbc3:68690513:last_committed=1144 sequence_number=1146
So
slave's gtid
<uuid>:68690514 ---> <uuid>:68690513
maste's gtid
<uuid>:68690513 ---> <uuid>:68690514
After several day's investigation, we find some MyIsam table in out schema.
my.cnf
slave_pending_jobs_size_max=16M
binlog_order_commits=1
slave_preserve_commit_order=1
slave_parallel_workers=12
slave_parallel_type=logical_clock
How to repeat:
my.cnf
slave_pending_jobs_size_max=16M
binlog_order_commits=1
slave_preserve_commit_order=1
slave_parallel_workers=12
slave_parallel_type=logical_clock
0. Construct a Master / Slave cluster, Make sure using the configuration mentioned above
1.create a table using MyIsam Engine.
2.Insert some data in parallel(Make group commit take effect) .
3. compare the gtid sequence between master and slave.
4. repeat the 2nd step until you find gtid disorder
Suggested fix:
I suggest we should give a warning in error log when the following condition holds
1. slave_parallel_workers >0
2.slave_parallel_type=logical_clock
3.slave_preserve_commit_order=1
4. the binlog event applying is from a Myisam table
[23 Jul 2019 13:02]
MySQL Verification Team
Hi,
Verified as described, but this is not a bug. I changed the severity to "Feature request" as I do agree that warning should be pushed to log when myisam table is involved.
thanks
Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders. It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.