Last updated on JULY 24, 2016
Applies to:MySQL Cluster - Version 7.2 and later
Information in this document applies to any platform.
Example table definition:
CREATE TABLE `tbl` (
`id` int(11) NOT NULL,
`cntr` int(11) NOT NULL,
`updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING HASH
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (id) */
Thread 1 runs periodically: UPDATE tbl SET cntr=cntr+1 WHERE id = 13;
Thread 2 runs periodically: REPLACE INTO tbl set id=15000,updatetime=NOW();
We met (only very few times), in an operational site, a "Lock wat timeout exceeded"; on the REPLACE statement.
- Can there be a conflict between these two threads ?
- Can you explain lock taken for UPDATE and REPLACE with engine NDBCLUSTER? table level or row level?
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms