After setting a valid configuration on the topology coordinator via the updateConfig method, one of the following conditions should hold.
- _selfIndex == -1, and the reported state is RS_REMOVED
- _selfIndex == 0, the config contains exactly one member, and
- That member is electable, in which case the reported state should be RS_PRIMARY
- That member is not electable, in which case either the reported state is RS_ARBITER or RS_STARTUP2 based on the config's arbiter flag.
- The config contains many members, in which case the reported state is RS_STARTUP2
If the reported state is RS_STARTUP2, the applier thread will eventually promote to RS_SECONDARY, possibly after an initial sync and/or a stint in RS_RECOVERY.