Yes, it is possible for a node to be used as a read-only server in case of a
network partition, but it does not happen automatically.
The following things are required:
- detect the fact that the node became isolated by monitoring SHOW STATUS,
checking for a 1047 error on queries, or by using a wsrep_notify_cmd script
- force the node to begin accepting queries again by using SET
GLOBAL|SESSION wsrep_on=OFF
- make sure the clients are not allowed to issue write queries by using
appropriate user permissions or by using SET GLOBAL read_only=1
- after the node has rejoined the cluster, restore wsrep_on and read_only
The important thing would be to make sure that no update queries are run on
the connection while wsrep_on is OFF , as this will cause the cluster to
become inconsistent. Galera does not provide a built-in protection against
that, so that guarantee should be enforced by the user.
Philip Stoev
-----Original Message-----
From: bbnlaccts acnts
Sent: Thursday, June 30, 2016 08:22
To: codership
Subject: [codership-team] Re: can a node work if it looses connectivity with
the cluster