Cluster Replication: Ensure Table Discovery Sets Up Exceptions Tables Correctly (Doc ID 2207957.1)

Last updated on NOVEMBER 28, 2016

Applies to:

MySQL Cluster - Version 7.3 and later
Information in this document applies to any platform.

Symptoms

Conflict detection / resolution allows an exceptions table to be configured so that when conflicts are discovered, the operation and data involved can be recorded.

A current limitation of this mechanism is that multiple table objects are involved in configuring conflict resolution, and there are ordering dependencies between them.

Specifically, the table in question must not be created before both of the ndb_replication table and contents and the relevant exceptions table have been created.

This is fairly easy to ensure when creating and populating the tables by a script, but harder when dealing with backup + restore, MySQLD restart, etc. 

When a MySQLD restarts it 'discovers' tables based on either or both of :

Neither of these discovery mechanisms are particularly ordered, and so it is possible to discover an exceptions table before or after its related table.

If an exceptions table is discovered after its respective table then it will not be registered for storing exceptions.

When mysql server restarts, exception table could be discovered after the origine table.
In this case the “NDB Slave: Table test.test2 logging exceptions to test.test2$EX” trace is missing and exception table never updated when a conflict occurs.

Bad traces:

2014-07-21 16:45:52 29427 [Note] NDB Slave: Table test.test2 using conflict_fn NDB$EPOCH_TRANS.
2014-07-21 16:45:52 29427 [Note] NDB Binlog: DISCOVER TABLE Event: REPL$test/test2
2014-07-21 16:45:52 29427 [Note] NDB Binlog: logging ./test/test2 (UPDATED,USE_UPDATE)
….
2014-07-21 16:45:52 29427 [Note] NDB Slave: Table test.test2$EX using conflict_fn NDB$EPOCH_TRANS.

Good traces:

2014-07-22 10:22:58 29427 [Note] NDB Slave: Table test.test12$EX using conflict_fn NDB$EPOCH_TRANS.
2014-07-22 10:22:58 29427 [Note] NDB Binlog: CREATE TABLE Event: REPL$test/test12$EX
2014-07-22 10:23:20 29427 [Note] NDB Slave: Table test.test12 logging exceptions to test.test12$EX
2014-07-22 10:23:20 29427 [Note] NDB Slave: Table test.test12 using conflict_fn NDB$EPOCH_TRANS.
2014-07-22 10:23:20 29427 [Note] NDB Binlog: CREATE TABLE Event: REPL$test/test12
2014-07-22 10:23:20 29427 [Note] NDB Binlog: logging ./test/test12 (UPDATED,USE_UPDATE)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms