Handle Mongo replica set failover