Bug #27286 Rare racecondition in nodeid allocation on master failure
Submitted: 20 Mar 2007 12:21 Modified: 23 Mar 2007 9:37
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:
Assigned to: Jonas Oreland CPU Architecture:Any

[20 Mar 2007 12:21] Jonas Oreland
Description:
Alloc node id could hang.
This causes starting node to hang

This could occur if master node died during alloc_node_id

How to repeat:
===== MgmtSrvr.cpp 1.117 vs edited =====
--- 1.117/storage/ndb/src/mgmsrv/MgmtSrvr.cpp   2007-03-20 13:20:36 +01:00
+++ MgmtSrvr.cpp        2007-03-20 13:20:33 +01:00
@@ -2131,6 +2131,8 @@
       {
         do_send = 1;
         nodeId = refToNode(ref->masterRef);
+       if (!theFacade->get_node_alive(nodeId))
+         nodeId = 0;
         continue;
       }
       return ref->errorCode;
[20 Mar 2007 13:32] 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/commits/22342

ChangeSet@1.2123, 2007-03-20 14:31:35+01:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#27286 (wl2325-5.0)
    make sure that node is sendable...
[21 Mar 2007 7:48] 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/commits/22430

ChangeSet@1.2443, 2007-03-21 08:47:54+01:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#27286
    make sure master node is sendable, when getting ref::NotMaster
[21 Mar 2007 7:57] 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/commits/22431

ChangeSet@1.2299, 2007-03-21 08:57:14+01:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#27286 (5.0 version)
    make sure master is sendable
[22 Mar 2007 20:47] Mads Martin Joergensen
Fixed in 5.1.17
[23 Mar 2007 9:37] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.40, 5.1.17, and ndb-6.1.6 changelogs.