I have a replicaset that processes largish batches of inserts (a few million) every night. Last night, the primary failed over and went into a rollback state. All clients which access this replicaset use a connection URL with
w=majority. The mongo DB documentation states that this should be sufficient to stop the old primary entering the rollback state. The old primary was in the rollback state for a solid 45 minutes.
Am I missing something in the config to ensure this doesn't happen?