Bug #20350 PURGE STALE SESSION not documented/obsolete
Submitted: 9 Jun 2006 8:43 Modified: 16 Jun 2006 3:23
Reporter: Tomas Ulin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1/5.0/5.1 OS:Any (All)
Assigned to: Jon Stephens CPU Architecture:Any

[9 Jun 2006 8:43] Tomas Ulin
Description:
when a node in the cluster connects (mysqld, ndbd) it first connects to the ndb_mgmd to reserve a node id in the cluster. To ensure that no other node may allocate the same node id, this reservation is kept until the node has managed to connect to the cluster and at least one ndbd reports that this node is connected. The reservation is guarded by the connection between the node and the ndb_mgmd.

Now if something goes wrong, normally the the node disconnects from the ndb_mgmd, and the socket closes properly, and the reservation is freed. However, if there is a disconnect because of e.g. a machine going down, network disconnect etc. The normal close of a socket by the OS does not occur. In this case this results in the node id to be reserved, and not released until TCP timeout happens after 10 or so minutes.

Now PURGE STALE SESSIONS runs though all reserved hode ids and removes any that are not connected to the cluster.

From 5.0.22 (and 5.1.11) we introduce timeout handeling here, so PURGE STALE SESSIONS should not be needed anymore. We require that a nodeid is made use of within 20 seconds or so...

How to repeat:
.
[16 Jun 2006 3:23] Jon Stephens
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

Updated 4.1/5.0/5.1 Manual per submitter's comments.