Priority for safe to bootstrap over sequence number

210 views
Skip to first unread message

pl...@asperasoft.com

unread,
Nov 12, 2017, 1:28:47 AM11/12/17
to codership
Hi All,

I was playing around with galera cluster. My cluster went into a split brain. I have a logic for choosing the leader, the node which can start as seed.

The logic is like:

if (is_leader or safe_to_bootstrap)
  you are elected as leader
end

is_leader: node with the leading sequence number(GTID)

But this condition is incorrect, as there can be multiple seeds. I needed a suggestion on what to prioritize: Sequence number or safe_to_bootstrap flag?

Thanks,
Puneet

Lammert Bies

unread,
Nov 14, 2017, 4:30:18 AM11/14/17
to codership
In a split brain condition, there never will be a primary component, or leader, as you name it. The only safe way to survive a split brain condition is to mark the separate cluster parts as non-primary and prohibit any updates to them until they are united again. Marking both cluster parts as non-primary is exactly what Galera is doing.

You can read more about this at http://galeracluster.com/documentation-webpages/weightedquorum.html in the section about split-brain conditions. This page also gives hints by using quorum weights to prevent split brain situations to occur, even if there is an even number of nodes in the cluster and the cluster splits in two equal parts.

With an even number of cluster nodes, you can also add an arbitrator (see http://galeracluster.com/documentation-webpages/arbitrator.html) which as a node takes part in the quorum calculation process, but doesn't store any data.
Reply all
Reply to author
Forward
0 new messages