-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Internal Code, Sharding
-
None
-
Storage 2017-10-02
This is continuation of SERVER-29428:
When pointing a 3.4 mongos at a featureCompatibilityVersion=3.6 cluster, the mongos spins, logging:
remote host has incompatible wire version: IncompatibleServerVersion: Server
min and max wire version are incompatible (6,6) with client min wire version
(5,5)
Instead, the processes should quickly exit with a non-zero exit code and a useful error message. The error message should display a "MustUpgrade" error code and should link to the documentation for the 3.4=>3.6 upgrade process.
This is not possible because mongos uses a DBConnectionPool, which uses a MongoURI that does not return a status code, but sets an error string. MongoURI::connect should return a StatusWith<DBClientConnection> to determine the reason for connection failure, which can be checked in Refresher::_refreshUntilMatches in replica_set_monitor.cpp
DBClientBase* DBConnectionPool::get(const MongoURI& uri, double socketTimeout) { std::unique_ptr<DBClientBase> c(_get(uri.toString(), socketTimeout)); if (c) { onHandedOut(c.get()); return c.release(); } string errmsg; c = std::unique_ptr<DBClientBase>(uri.connect(StringData(), errmsg, socketTimeout)); uassert(40356, _name + ": connect failed " + uri.toString() + " : " + errmsg, c); return _finishCreate(uri.toString(), socketTimeout, c.release()); }
- is related to
-
SERVER-29428 Make 3.4 mongod fail gracefully in featureCompatibilityVersion 3.6 cluster
- Closed
- related to
-
SERVER-32635 Provide a framework to ensure a last stable binary version mongos crashes when attempting to connect to a latest featureCompatibilityVersion sharded cluster for all last stable binary versions >= 3.8
- Closed