I was trying to load a ~200G file into MySQL cluster having 4 data nodes, and my DDL for the target table is like this:
CREATE TABLE XXXXXX
(
ID BIGINT AUTO_INCREMENT PRIMARY KEY,
COL1...,
COL2...,
.......
)
ENGINE = NDB PARTITION BY KEY();
after few minutes of loading, I received following error:
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
and I found some records loaded into the target table. what should I do to overcome this issue?
some of the variables values which might be helpful:
wait_timeout : 28800
ndb_wait_connected: 30
ndb_wait_setup : 30
I have seen issue like that with tables with BLOB/TEXT entries + long running select. NDB uses a hidden table to store chunks for larger objects, and as a side effect unique key SELECT's create a shared read lock for the tables. See http://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-limitations-transactions.html
So on a two node cluster
On the second node, updates for the table may fail.
Depending on the version, you might see a different error, like