[SERVER-28129] No election in four member replica set with 2 nodes down one by one Created: 27/Feb/17  Updated: 27/Oct/23  Resolved: 27/Feb/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Ivan Artemov Assignee: Kelsey Schubert
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 (Local computer)


Attachments: PNG File 1.png     PNG File 2.png     PNG File 3.png     PNG File 4.png    
Participants:

 Description   

I run 3 instances with arbiter:

REPEAT N IN (0-2)
mongod.exe --dbpath "C:\Databases\Replica\Repl

{N}" --logpath "C:\Databases\Replica\Repl{N}

\Logs\Log.txt" --port 4000

{N}

--replSet RPL

Arbiter:
mongod.exe --dbpath "C:\Databases\Replica\ReplArb" --smallfiles --nojournal --noprealloc --logpath "C:\Databases\Replica\ReplArb\Logs\Log.txt" --port 40003 --replSet RPL

initiate, add, addArb.

40000 - master,
40001 - secondary,
40002 - secondary
40003 - arbiter

1) Kill - 40000
2) 40001 became primary
3) Kill 40001
ooops...

40002 - secondary
40003 - arbiter

And 40002 still waiting to be PRIMARY.
What wrong ?

P.S When i run 2-member replica set with arbiter - it's work ok and election were held, but this configuration is fail.



 Comments   
Comment by Kelsey Schubert [ 27/Feb/17 ]

Hi ZOXEXIVO

This is expected behavior as primary cannot be elected without a majority nodes in the replica set voting for it. Since 2 of the four (3 data-bearing nodes and one arbiter) are unavailable, no election can take place. Please review our documentation on elections in MongoDB for additional information.

Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question about replica set configuration and failover scenarios involves more discussion would be best posted on the mongodb-users group.

Thank you,
Thomas

Generated at Thu Feb 08 04:17:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.