Hi Asad,

Raft uses majority for committing transactions.  When two nodes are not
aware of each other are both taking writes, at most one of them can get a
majority.  The one(s) without majority cannot commit any transactions.
When these two nodes are merged, if one of them had the majority
previously, the one without majority won't be voted as the leader so that
its (non-committed) transactions will be dropped.

For the details, please see the Raft paper https://raft.github.io/raft.pdf
.  It should be discussed in Section 5.4 Safety.

Tsz-Wo



On Thu, Jul 14, 2022 at 6:57 AM Asad Awadia <[email protected]> wrote:

> Hello,
>
> How does ratis handle split brain? (Using the term counter?)
>
> That is two nodes are not aware of each other are both taking writes and
> now are merged into one cluster with one leader.
>
> How are the writes reconciled? Whose work is overwritten? Or is the
> cluster now in a bad state in need of manual intervention?
>
> Regards,
> Asad
>

Reply via email to