QuestionQ139

Architecture

Review the following commands, which run successfully on the ic1 host:

mysqlsh> dba.createCluster('cluster1', \{memberWeight:35\})  
mysqlsh> var mycluster = dba.getCluster()  
mysqlsh> mycluster.addInstance('ic@ic2', \{memberWeight:25\})  
mysqlsh> mycluster.addInstance('ic@ic3', \{memberWeight:50\})  

Now review this configuration setting, which is identical on every node:

group_replication_consistency=BEFORE_ON_PRIMARY_FAILOVER  

The primary node ic1 fails.

Which statement is true?

  • A Node ic3 becomes the new primary and is ignored until any backlog of transactions is completed.
  • B Node ic2 becomes the new primary and current transactions are considered stale and rolled back.
  • C Only two nodes remain so the election process is uncertain and must be done manually.
  • D Node ic3 becomes the new primary and current transactions are considered stale and rolled back.
  • E Node ic2 becomes the new primary and is ignored until any backlog of transactions is completed.
Explanation

Group Replication member weight influences primary election, so the remaining member with weight 50, ic3, is selected over ic2 with weight 25. BEFORE_ON_PRIMARY_FAILOVER holds new read-only and read/write transactions on a newly elected primary until its replication backlog has been applied, ensuring clients do not observe stale data.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!