Bug #44908 ndbmtd needs extra resources per LQH thread, gives obscure error message
Submitted: 15 May 2009 19:27 Modified: 9 Sep 2009 13:43
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysql-5.1.32-ndb-7.0.5

[15 May 2009 19:27] Hartmut Holzgraefe
Description:
When using multiple LQH threads parameters like MaxNoOfTables need to be raised accordingly. What makes things worse is that when running out of table handles due to higher MaxNoOfExecutionThreads an undocumented error code 306 is reported instead of the usual error code raised by a single threaded ndbd in this case.

How to repeat:
Start ndbmtd with different MaxNoOfExecutionThreads settings and test how many tables can be created before running into an error.

Suggested fix:
* document the extra resource needs
* raise understandable error codes/messages instead of the "unknown" error 306
[15 May 2009 19:47] Jonas Oreland
would auto-multiply by #threads also be ok ?
(we already do some auto-multiply/divide)
[15 May 2009 19:57] Jonas Oreland
proposed patch

Attachment: patch (application/octet-stream, text), 492 bytes.

[15 May 2009 19:59] Hartmut Holzgraefe
When creating tables in a loop with the default MaxNoOfTables=128:

== MaxNoOfExecutionThreads= 2 ==
1
...
129
ERROR 1005 (HY000) at line 1: Can't create table 'test.t129' (errno: 136)

== MaxNoOfExecutionThreads= 4 ==
1
...
79
ERROR 1005 (HY000) at line 1: Can't create table 'test.t79' (errno: 306)

== MaxNoOfExecutionThreads= 8 ==
1
...
38
ERROR 1005 (HY000) at line 1: Can't create table 'test.t38' (errno: 306)
[9 Sep 2009 10:27] 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/82793

2995 Jonas Oreland	2009-09-09
      ndb - bug#44908
        Out of fragment records in DIH, adjust for no of
        LQH instances and add proper error message
        (which *should* not happen, hence marked internal error)
[9 Sep 2009 11:04] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:jonas@mysql.com-20090909110427-4vsmv05b2i6svff9) (version source revid:jonas@mysql.com-20090909110427-4vsmv05b2i6svff9) (merge vers: 5.1.35-ndb-7.1.0) (pib:11)
[9 Sep 2009 11:06] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090909110150-kdvot0410na89hk5) (version source revid:jonas@mysql.com-20090909094333-7kgwolnlmpop77f1) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[9 Sep 2009 13:43] Jon Stephens
Documented bugfix in the NDB-7.0.8 changelog as follows:

        For multi-threaded data nodes, insufficient fragment records
        were allocated in the DBDIH NDB kernel block; the number
        allocated did not take into account the number of LQH instances.

Closed.