If mongos 2.7.8 or later is started with a configdb string that differs from other mongoses, it can successfully perform writes to the config db. This is possible even if the config servers specified by the mongos are partially or wholly disjoint from the actual/existing config servers. The expected behaviour (and actual behaviour in 2.7.7 and earlier) is that these writes fail (with "could not verify config servers were active and reachable before write").
git bisect confirms that this is a regression caused by SERVER-15375, ie. f67afb4ff33bd803e93e2a52c0249cb872af680b is the breaking commit.
The proximal cause is a failure of the mongos to call setShardVersion (SSV) (with init: true) when it connects to the config servers. This lack of SSV has been verified with logLevel 1 on the config servers. This means that the usual configdb string checking is not performed, and so the mongos is unaware that its configdb string differs from other mongoses.
There should be a jstest to check that a mongos started with a different configdb string is unable to write to the configdb.
- is related to
-
SERVER-16774 Better enforcement of configdb string consistency
- Closed
- related to
-
SERVER-15375 initShardVersion triggers inline RS refresh if no primary is available, creating additional latency for user queries
- Closed
-
SERVER-15879 Better error reporting when the mongos configdb string does not match with cached one
- Closed