NDB Cluster Replication Conflict Resolution Read conflict detection and resolution.  NDB Cluster also supports tracking of read operations, which makes it possible in circular replication setups to manage conflicts between reads of a given row in one cluster and updates or deletes of the same row in another. This example uses  employee  and department  tables to model a scenario in which an employee is moved from one department to another on the source cluster (which we refer to hereafter as cluster  A ) while the replica cluster (hereafter  B ) updates the employee count of the employee’s former department in an interleaved transaction. The data tables have been created using the following SQL statements: The contents of the two tables include the rows shown in the (partial) output of the following  SELECT statements: We assume that we are already using an exceptions table that includes the four required columns (and these are used for this table’s primary key), the optional columns for operation type and cause, and the original table’s primary key column, created using the SQL statement shown here: 4652 CREATE TABLE employee$EX ( NDB$server_id INT UNSIGNED, NDB$source_server_id INT UNSIGNED, NDB$source_epoch BIGINT UNSIGNED, NDB$count INT UNSIGNED, NDB$OP_TYPE ENUM( ’WRITE_ROW’,’UPDATE_ROW’, ’DELETE_ROW’, ’REFRESH_ROW’,’READ_ROW’) NOT NULL, NDB$CFT_CAUSE ENUM( ’ROW_DOES_NOT_EXIST’, ’ROW_ALREADY_EXISTS’, ’DATA_IN_CONFLICT’, ’TRANS_IN_CONFLICT’) NOT NULL, id INT NOT NULL, mysql>  SELECT id, name, dept FROM employee; +---------------+------+ | id | name | dept | +------+--------+------+ ... | 998 | Mike | 3 | | 999 | Joe | 3 | | 1000 | Mary | 3 | ... +------+--------+------+ mysql>  SELECT id, name, members FROM department; +-----+-------------+---------+ | id | name | members | +-----+-------------+---------+ ... | 3 | Old project | 24 | ... +-----+-------------+---------+ # Employee table CREATE TABLE employee ( id INT PRIMARY KEY, name VARCHAR(2000), dept INT NOT NULL ) ENGINE=NDB; # Department table CREATE TABLE department ( id INT PRIMARY KEY, name VARCHAR(2000), members INT ) ENGINE=NDB;