Cluster Replication: Ensure Table Discovery Sets Up Exceptions Tables Correctly
Last updated on NOVEMBER 28, 2016
Applies to:MySQL Cluster - Version 7.3 and later
Information in this document applies to any platform.
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.
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 :
- A MySQLD data-directory scan, finding .frm and .ndb files
- An Ndb dictionary table metadata scan, finding tables
Neither of these discovery mechanisms are particularly ordered, and so it is possible to discover an exceptions table before or after its related table.
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.
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.
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)
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