mysqlmysql-group-replication

can we use REPEATABLE-READ isolation level in mysql group replication?


I'm looking the Mysql Group Replication reference manual in group replication limitations(https://dev.mysql.com/doc/refman/8.0/en/group-replication-limitations.html) And the manual has said that

manual's content about gap lock

I have searched this problem in google, but I only get the information like the manual.

Because I need to use RR isolation level. So I want to know if I use Mysql Group Replication in single primary model, does it have problem?

And if it have problem, what will the problem be?


Solution

  • Because I need to use RR isolation level. So I want to know if I use Mysql Group Replication in single primary model, does it have problem?

    Note that you can read on the top of the page you pasted

    Note that the limitations and issues described for multi-primary mode groups can also apply in single-primary mode clusters during a failover event, while the newly elected primary flushes out its applier queue from the old primary.

    However since version 8.0.13, writes to the new primary were restricted to avoid such issues, so in theory it is safe if you must RR

    The issue with GAP locks is that it can you have inputs coming from the group and inputs being written on that member that clash as there are some GAP locks in place. The issue is that the outcome of that scenario might result on local changes on that member that are not propagated to the other members (data divergence).