One of our customers reported that ‘create table select from’ statements stall for a period of time equal to the TokuDB lock timeout. This indicated a lock conflict between multiple transactions. In addition, other MySQL clients that were opening unrelated tables were also stalled. This indicated that some shared mutex is held too long. We discuss details about this bug and how it was fixed. The bug fix will be distributed in TokuDB 7.1.0.
Suppose that we set the tokudb lock timeout to 60 seconds just to exaggerate the stall.
mysql> set global tokudb_lock_timeout=60000;
Query OK, 0 rows affected (0.00 sec)
We then create a simple table.
mysql> create table s (id int primary key);
Query OK, 0 rows affected (0.02