0

I'm currently playing with Percona XtraDB Cluster which is based on Galera Cluster. In Galera docs I saw the following: Warning: When using Galera Cluster in master-slave mode, all four levels are available to you, to the extend that MySQL supports it. In multi-master mode, however, you can only use the REPEATABLE-READ level.

And the issue is that my app is using READ-COMMITTED isolation level. So I want to find out how Galera operates with this isolation level. According to the warning mentioned above, Galera should work in the master-slave mode only. Which mean only a single node should allow writes.

But I did an experiment: having a cluster with 3 nodes (on a single PC using Docker), I changed isolation level on all nodes to READ-COMMITTED, restarted these nodes and tried to do write queries on every node - all done successfully, which conflicts with the warning above.

So, here my questions are:

  1. How does Galera react on non-"REPEATABLE-READ" isolation levels?
  2. How can I check whether a cluster operates in master-master or master-slave mode? Shouldn't slave nodes decline write queries?
Roman Proshin
  • 830
  • 2
  • 9
  • 18
  • Is Read-Committed a real requirement of your APP? – Rick James Mar 12 '19 at 20:06
  • @RickJames well, it historically happened that our app works with read-committed. I've tried to simply change the isolation level to repeatable-read and that lead to a lot of issues due to deadlocks and lock timeouts. So it's easier to continue using read-committed. That's why I'm asking this question. – Roman Proshin Mar 14 '19 at 08:25

1 Answers1

0

As far as I could understand different info sources (like this and this), "local" isolation level may be any of supported by the DBMS engine. The latter article says:

Individual cluster nodes can provide any isolation level to the extent it is supported by MySQL/InnoDB.

And only communication between the node works differently: Galera simply not support SERIALIZABLE level and can work with other ones.

And about the second question. Galera always works in "master-master" mode (link?). And only some manual changes in config can force "slave" instances decline "write" queries.

Still, if somebody has more info or knows that my answer is wrong - welcome to write your answer.

Roman Proshin
  • 830
  • 2
  • 9
  • 18