Bug #45921 api/mysqld can after cluster restart reconnect with nodeid that is already used

Submitted: 2 Jul 2009 20:47 Modified: 7 Jul 2009 7:31
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[2 Jul 2009 20:47] Jonas Oreland
Description:
If a cluster is fully restararted,
an api/mysqld can try to reconnect with a node id
that might have been allocated by different api/mysqld
in this case, both will be partially connected with pain
and misery as a consequence.

work-around: don't use dynamic node ids

How to repeat:
.

Suggested fix:
the fix introduces a new config variable for the [mysqld] section "AutoReconnect"
which is set to false, forces api/mysqld to reconnect "fully", i.e by recreating the Ndb_cluster_connection.

The default value of the parameter is true, i.e old behaviour.

The fix also exposes a 2 methods on Ndb_cluster_connection
  void set_auto_reconnect(int value);
  int get_auto_reconnect() const;

If the set_auto_reconnect is used, it overrides value in config.
[2 Jul 2009 20: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/77831

2994 Jonas Oreland	2009-07-02
      ndb - bug#45921 - add possibility to affect reconnect behaviour
[3 Jul 2009 21:40] Bugs System
Pushed into 5.1.35-ndb-7.0.7 (revid:jonas@mysql.com-20090703213649-xfj64gq7xcs7085h) (version source revid:jonas@mysql.com-20090703212226-m6117yn4xjv4rhsw) (merge vers: 5.1.35-ndb-7.0.7) (pib:11)
[4 Jul 2009 7:54] Jonas Oreland
also pushed into 6.3.26
[7 Jul 2009 7:31] Jon Stephens
Documented bugfix in the NDB-6.3.26 and 7.0.7 changelogs as follows:

    The AutoReconnect configuration parameter for API nodes (including 
    SQL nodes) has been added. This is intended to prevent API nodes 
    from re-using allocated node IDs during cluster restarts. For more 
    information, see
    http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-api-definition.html.

    This fix also introduces two new methods of the 
    Ndb_cluster_connection class in the NDB API. For more information, 
    see 
    http://dev.mysql.com/doc/ndbapi/en/class-ndb-cluster-connection-set-auto-reconnect.html
    and 
    http://dev.mysql.com/doc/ndbapi/en/class-ndb-cluster-connection-get-auto-reconnect.html.
[7 Jul 2009 7:55] Jon Stephens
Commit with docs changes: http://lists.mysql.com/commits/78078
[9 Jul 2009 7:35] Bugs System
Pushed into 5.1.35-ndb-7.0.7 (revid:jonas@mysql.com-20090703213649-xfj64gq7xcs7085h) (version source revid:jonas@mysql.com-20090703212226-m6117yn4xjv4rhsw) (merge vers: 5.1.35-ndb-7.0.7) (pib:11)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.057 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.