content_image/681958.jpg
originating directly from Cluster 1 are more recent than those received through Cluster 2. You can handle this by ensuring that Cluster 3 catches up to Cluster 2 with regard to updates from Cluster 1. In terms of MySQL servers, this means that you need to replicate any outstanding updates from MySQL server C to server F. 

On server C, perform the following queries: 

mysqlC> SELECT @latest:=MAX(epoch) -> FROM mysql.ndb_apply_status -> WHERE server_id=1; mysqlC> SELECT -> @file:=SUBSTRING_INDEX(File, ’/’, -1), -> @pos:=Position -> FROM mysql.ndb_binlog_index -> WHERE orig_epoch >= @latest -> AND orig_server_id = 1 -> ORDER BY epoch ASC LIMIT 1; 

<img src='content_image/681958.jpg'>

## Note 

You can improve the performance of this query, and thus likely speed up failover times significantly, by adding the appropriate index to the ndb_binlog_index table. See Section 23.6.4, “NDB Cluster Replication Schema and Tables” , for more information. 

Copy over the values for @file  and @pos  manually from server C to server F (or have your application perform the equivalent). Then, on server F, execute the following CHANGE REPLICATION SOURCE TO statement (MySQL 8.0.23 and later) or CHANGE MASTER TO  statement (prior to MySQL 8.0.23): 

mysqlF> CHANGE MASTER TO -> MASTER_HOST = ’serverC’ -> MASTER_LOG_FILE=’@file’, -> MASTER_LOG_POS=@pos; 

Beginning with MySQL 8.0.23, you can also use the following statement: 

mysqlF> CHANGE REPLICATION SOURCE TO -> SOURCE_HOST = ’serverC’ -> SOURCE_LOG_FILE=’@file’, -> SOURCE_LOG_POS=@pos; 

Once this has been done, you can issue a START REPLICA | SLAVE  statement on MySQL server F; this causes any missing updates originating from server B to be replicated to server F. 

The CHANGE REPLICATION SOURCE TO  | CHANGE MASTER TO  statement also supports an IGNORE_SERVER_IDS  option which takes a comma-separated list of server IDs and causes events originating from the corresponding servers to be ignored. For more information, see Section 13.4.2.1, “CHANGE MASTER TO Statement” , and Section 13.7.7.36, “SHOW SLAVE | REPLICA STATUS Statement” . For information about how this option intereacts with the ndb_log_apply_status  variable, see Section 23.6.8, “Implementing Failover with NDB Cluster Replication” . 

## 23.6.11 NDB Cluster Replication Conflict Resolution 

•Requirements 

•Source Column Control 

•Conflict Resolution Control 

•Conflict Resolution Functions 

