Bug #39286 Deletes on partition tables takes large time on slave to execute using row based
Submitted: 6 Sep 2008 3:17 Modified: 8 Oct 2008 6:41
Reporter: bhushan uparkar Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S2 (Serious)
Version:5.1.25 OS:Any (Debian)
Assigned to: CPU Architecture:Any
Tags: dead slow execution, deletes, partitioning, row based replication

[6 Sep 2008 3:17] bhushan uparkar
Description:
Hello,

I am using MySql 5.1.25 on debian linux,

dbbackup@dmdb902:~$ uname -a
Linux dmdb902 2.6.18-5-amd64 #1 SMP Thu May 31 23:51:05 UTC 2007 x86_64 GNU/Linux

Server: Dell 2950 with 2 Quad processor 2.33 GHz
Ram: 32 GB

 We are using Master/Slave setup with row based replication. When we delete the records from a partition based tables on master it executes within fraction of seconds [ in this case I deleted 44K records ], but on slave it took 6+ hours to execute the same delete opration. This causes the slave to be out of sync for entire duration. Though I was able to do various queries on slave, its responding fine. Following are some of the status from innodb engine related to above "delete operation on slave",
=======================
dbbackup@dmdb902:~$ uname -a
Linux dmdb902 2.6.18-5-amd64 #1 SMP Thu May 31 23:51:05 UTC 2007 x86_64 GNU/Linux
dbbackup@dmdb902:~$ mysql -u dbbackup -e "show engine innodb status \G" | grep deleted
Number of rows inserted 6943572056, updated 2984030186, deleted 10281730, read 383560006516
dbbackup@dmdb902:~$ mysql -u dbbackup -e "show engine innodb status \G" | grep deleted
Number of rows inserted 6943572056, updated 2984030186, deleted 10282622, read 383560606931
dbbackup@dmdb902:~$ uname -a
Linux dmdb902 2.6.18-5-amd64 #1 SMP Thu May 31 23:51:05 UTC 2007 x86_64 GNU/Linux
dbbackup@dmdb902:~$ mysql -u dbbackup -e "show engine innodb status \G" | grep deleted
Number of rows inserted 6943572056, updated 2984030186, deleted 10283413, read 383560607722

============================

 The slave executes the replication log very very slow.  In the past we have deleted the records from partitioned tables , and observed the same problem. But this problem did not happened quite consistently.
Let me know if you have question or need more details on this problem.

How to repeat:
1] Setup master and slave database using row based replication with build 5.1.25
2] Create partitioned table using range based partition,
3] Populate each partition with 100k -125k records per partition
4] Populate minimum 90 partitions
5] Delete the 40K-50K record from one of the partition
6] You will observe the slave for execution of delete

------------
[6 Sep 2008 3:20] bhushan uparkar
Partition table information

Attachment: fact_table.rtf (application/rtf, text), 26.92 KiB.

[8 Sep 2008 6:41] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.1.26, on both master and slave and inform about the results. In case of the same problem, please, send my.cnf from master and slave.
[8 Oct 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".