0

I had a replica set with 5 mongo nodes I shut 3 nodes for DR testing and add a new node to replica. however, even though one node has higher priority I still have 3 secondaries nodes and no primary. do you know why, what should be done how can I fix it

NoamiA
  • 521
  • 4
  • 19
  • Is the new added node one of the previously shut down nodes? If not, then how should the replica set know that it should accept the new node? – noam Jul 23 '20 at 09:53

1 Answers1

2

When you shut down 3 out of 5 nodes, you lost the ability to have a primary since a majority of nodes must vote for the primary.

When you added a new node, the new node had to sync data from the primary before it could become a new primary. Since there was no primary this sync couldn't have happened.

Your DR plans need to ensure there is always a majority of nodes operational.

D. SM
  • 13,584
  • 3
  • 12
  • 21
  • I have unrelated question maybe you can help, i have a replica set and one of my collection is 32G I want to create a ttl index on this collection, do you recommend delete less data before or by command or just create TTL? – NoamiA Aug 25 '20 at 14:15
  • Feel free to ask that as a new question. – D. SM Aug 25 '20 at 15:19