0

I'm in the process of setting up and testing an Innodb Cluster. So far I have three nodes running 8.0.27 and two routers all working fine.

I now want to test what happens if the network connection suddenly dissapears on one.

I have all three nodes set up with:

"autoRejoinTries", "3"
"exitStateAction","OFFLINE_MODE"
"expelTimeout":"5"

So when I remove the network connection from node 3 using:

ifdown eth0

I see that it disapears from the cluster and shows as:

"status": "UNREACHABLE",

and on the server itself it says:

"Cluster has no quorum and cannot process write transactions: Group has no quorum"

But I was expecting that the database would go into offline_mode. But when I check, it still says it is off:

SELECT @@GLOBAL.offline_mode;
+-----------------------+
| @@GLOBAL.offline_mode |
+-----------------------+
|                     0 |
+-----------------------+

Have I missed something, or misunderstood what "exitStateAction","OFFLINE_MODE" means?

1 Answer 1

0

To answer my own question, it was because of the autoRejoinTries value.

Basically, assuming a value of three, it does:

  • Network Fails
  • 5 seconds passes
  • a “suspicion” that a problem has occurred happens on all nodes
  • 5 seconds passes to see if the node re-appears (expel_timeout)
  • Node is expelled from the cluster
  • try and connect (1)
  • wait 5 minutes
  • try and connect (2)
  • wait 5 minutes
  • try and connect (3)
  • execute exitStateAction

In other words, you have to wait for 10 minutes before it goes into OFFLINE_MODE. Setting autoRejoinTries to 0 or 1 has the desired affect of making it go into OFFLINE_MODE straight away. Of course, it then doesn't try and reconnect automatically, which is a pain if you have a very brief outage.

I guess in light of the fact one of the options is ABORT_SERVER e.g. shutdown MySQL, it does make sense.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.