In our environment, we have one primary(A) and two secondaries(B & C nodes) running in Mongodb 4.0 version. secondary(C) server is newly added and sync is happening on that. Cluster is running only with A and B servers. Now, the Primary server(A) was abruptly down due to some host issue and it was not responding and we could also see that secondary server(B) was out of sync for 10 minutes. we were able to bring up only "B" as new primary. what will happen to the transactions that were completed in old primary (A) and that was not synced with secondary(B).? Please answer.
Mongodb – what will happen if MongoDB primary host is down and secondary is out of sync. will we lose transaction
database-designmongodbmongodb-4.0replication
Related Question
- MongoDB MMS – Same Alias for Two Data Nodes of Different Shards
- MongoDB – Replica Sets Syncing and Data Center Issue
- MongoDB 3.0 – How Elections Happen When a Secondary Goes Down
- MongoDB secondaries become unresponsive during replication
- Replication – MongoDB Replica Set Quorum Configuration and Network Partitioning Behavior
Best Answer
When you managed to get that A running, it will roll-back all those transactions what are not on B, because now B have newer transactions and it's Primary. That you get when you "force" Secondary to be primary against replica sets will.