…bout new conns, pending SERVER-7274
…gular conn should
…nter Call _snprintf on Windows or snprintf on other platforms directly instead of through a statically initialized function pointer. Windows code was calling sprintf_s, but _snprintf works fine and is already used in other places in the code.
Fixed test because stepdown is so much faster that the connection is dead by the time ismaster is called.
…ange is a small mitigation to just tell you what shard failed in checkAllVersions. So it doesn't fix the root version but should be incrementally helpful. The real solution is probably to do some sort of ShardConnectionException or something where at throw time the shard is known and its identity bundled with the error itself.
$err object a shard: field in certain cases to help user know where the problem context is. q: Is it ok to add such a field to the $err object?
Step 1: Implement and test the FailPoint class
…unclear as a user what is wrong. added the lists of hosts for the clusterconnection so you know what specifically is down. ideally we would say 'all config servers down: their_names' if that is what is wrong as that would be clearer but that would go somewhere up the stack so this is still suboptimal but an improvement.'
The version field will allow us to detect the primary's version. We need to know which version because only newer primary oplog streams should prevent a secondary from enforcing unique index constraints in initial sync or recovering states. The version field will also be useful in the future when we want to make schema changes in the oplog.
Versions of Windows prior to Windows Vista send a CTRL_LOGOFF_EVENT to services (at the handler set by SetConsoleCtrlHandler) when the interactive user logs off. Return FALSE from this notification and don't run consoleTerminate().