Hello,
While doing maintenance on a replica set yesterday, I noticed some unexpected behavior with rs.stepDown(), running Mongo 2.4.5.
We needed to restart the primary server hardware, so we issued rs.stepDown(900), reasoning that 15 minutes should be more than enough time to shut down our machine, come back up, and then step back up to primary. We can see in the log that this command was issued successfully. Secondary became primary.
However, after restarting the machine, the original primary remained secondary — it never stepped back up. After about 30 minutes, we realized we'd have to switch them back manually. We decided to use the same "bug" we had just observed to our advantage, so on the current primary, we issued rs.stepDown(30). As we expected, the servers swapped role and stayed that way. Over 12 hours now, and things are ok.
Is my understanding of stepDown() incorrect? Does an election not get triggered automatically after the given number of seconds has expired? Or is there something in our configuration that could possibly be awry to cause this?
Thanks in advance!