[SERVER-28333] Question about network partition and replica set Created: 16/Mar/17  Updated: 31/May/17  Resolved: 28/Mar/17

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

Type: Question Priority: Major - P3
Reporter: Aldo Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hello there,
I have a question about a possible scenario happened with a replica set, involving a network partition. Mongo version is 3.2.11

Let's suppose to have 3 nodes: A, B, C. A is the primary. B, C are secondary.
Suddendly a network partition happens and it continues for lot of hours. During the network partition A and B can connect, as well as B and C.
If I correctly understand how replication works:

  • A still see a majority of nodes and remains primary
  • C don't see A and thus attempts to start an election
  • C is disconnected from A and thus its data become older and older
  • B still see A and thus ignores the request for election from B
  • B continues to replicate from A

Now let's suppose that, after a lot of hours, without fixing the network partition, node A crashes.
If I'm correct B and C will start and election.

The question is: are we 100% sure that the election will result in the node B (which is synchronized with A) to be elected as primary ?
Or there is a possibility that instead the node C (which has very old data).



 Comments   
Comment by Kelsey Schubert [ 28/Mar/17 ]

Hi aldo,

In the case you describe, Node B would be elected as Primary.

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 like this involving more discussion would be best posted on the mongodb-users group.

Kind regards,
Thomas

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