Bug #14971 Purge master logs command may hang mysql server for cluster replication
Submitted: 16 Nov 2005 9:17 Modified: 16 Nov 2005 9:58
Reporter: Tomas Ulin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1 (custom) OS:
Assigned to: Tomas Ulin CPU Architecture:Any

[16 Nov 2005 9:17] Tomas Ulin
Description:
hitting purge master logs; with cluster replication hangs the mysql server

How to repeat:
set binlog size log, e.g. 20000
make sure there are many rows in cluster_replication.binlog_index
flush logs
purge master logs to '<last log file>'
.... hang

Suggested fix:
when purge is done the cluster_replication.binlog_index get rows deleted
these rows are logged in the binlog
if this logging causes a change of the binlog file because it exceeds the size
the LOCK_index mutex will be attempted to be take _again_ although it is already taken.
this causes the hang.

Solution:
do not log the changes in cluster_replication.binlog_index
[16 Nov 2005 9:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32308
[16 Nov 2005 9:58] Tomas Ulin
no need to document, will be documented separately in custom build