wojiaodoubao commented on PR #943:
URL: https://github.com/apache/ratis/pull/943#issuecomment-1774281969
> Change from {n0} to {n0, n1}.
> This case should work well. How could it be bad?
Hi @szetszwo , sorry for my late response. I made a test to simulate this
case. Please have a look at TestMembership#testAddOneToOne. The procedure is as
below.
1. Originally we have a cluster with 1 node n0.
2. Start n1 with empty conf.
3. Call setConfiguration to n0. After n1 catches up, n0 changes to
C_old_and_C_new.
4. A network partition happens. n1 doesn't get C_old_and_C_new.
5. n0 finds no majority because n1 doesn't answer. n0 quits and restarts
election.
6. Network partition recovers.
7. n1 never votes to n0, so we won't have leader anymore.
I think the reason is: all new peers' conf are empty while the peers in
C_old has became transitional conf. Peer with transitional conf needs votes
from both C_old majority and C_new majority. But 'We can't find any majority
without new peers in C_new'. That's why we won' get new leader.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]