Assume we have a replica set with 3 nodes(2 data and one arbiter)
A->primary, priority=2
B->secondary, priority=1, 10 seconds behind A
C->arbiter
Now A fails and B becomes primary. After some time A becomes online, does a rollback and after syncing it becomes primary again. Now we can apply roll backed data.
My question is what happen if priority of A is 1. after becoming online and doing a roll back, it will syncs with B. Now on which server we should apply roll backed data? since A is not primary anymore. Should we transfer roll backed data to B and do the operation?
Because you can only do writes to a primary, the rolled back data should always be applied on the primary. Which in your case means you need to either move the data to server B, or just use mongorestore to talk to the new primary (with the -h argument). The mongorestore utility will most likely not allow the data to be applied to a secondary.