what will happen if MongoDB primary host is down and secondary is out of sync. will we lose transaction? In our environment, we have one primary(A) and two secondaries(B &amp; 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 &quot;B&quot; 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.
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 &quot;force&quot; Secondary to be primary against replica sets will.