I've been trying to set up a minimal cluster to simply test the installation and setup of a set of databases. The cluster is all on one server and consists of a Management node, SQL node, API node, and a Data node. No redundancy whatsoever. When I try to install the 19 databases with a total of 80 tables. I'm getting the following failure:
ERROR 1296 (HY000) at line 1 in file: '../schema/indices.mysql': Got error 708 'No more attribute metadata records (increase MaxNoOfAttributes)' from NDBCLUSTER
Warning (Code 1296): Got error 708 'No more attribute metadata records (increase MaxNoOfAttributes)' from NDB
Error (Code 1296): Got error 708 'No more attribute metadata records (increase MaxNoOfAttributes)' from NDBCLUSTER
At this point of the install, the table is being altered to add keys and indices.
Based on
https://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-ndbd-definition.html#ndbparam-ndbd-maxnoofattributes the MaxNoOfAttributes I would have come to several conclusions:
1. It's not a hard limit, so things should have proceeded.
2. The value should be the maximum of two different values:
2a. 6 * the number of attributes in the table, or
2b. MaxNoOfTables * Average number of attributes per table.
The value for MaxNoOfAttributes is the default (1000). The MaxNoOfTables is the default (128).
I can't find anywhere that defines what a table attribute actually is.
What I've done to try to figure out what the correct value is the following:
1. Pick a larger number for MaxNoOfAttributes until I can load all of the databases.
2. Use a combination of ndb_show_tables and ndb_desc to get the "K Value" (number of keys, which I think count as attributes) and the "Number of attributes".
The largest table seems to have 23 attributes and 6 keys. According to the docs, then 174 (29 * 6) should be enough.
If I'm calculating the average number of attributes per table to be 12.3 (6.3 attributes + K value of 6), then:
MaxNoOfTables * Average is less than 1600.
Does anyone know of the correct way to ensure that MaxNoOfAttributes is set correctly?
If anyone cares, here is the script I use to get the total number of attributes and K values of tables:
time ( ndb_show_tables |
egrep "SystemTable|UserTable" |
awk '{ print "ndb_desc", $7, "-d", $5 }' > table-desc.sh &&
bash table-desc.sh > table-desc.txt &&
grep "K Value:" table-desc.txt > k.txt &&
grep "attributes:" table-desc.txt > attributes.txt &&
awk 'BEGIN { sum = 0 } { sum += $3 } END { print sum }' < k.txt &&
awk 'BEGIN { sum = 0 } { sum += $4 } END { print sum }' < attributes.txt )
Any pointers would be appreciated.
Shane Turner