diff options
author | Greg Studer <greg@10gen.com> | 2013-11-18 16:36:30 -0500 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2013-11-20 13:37:44 -0500 |
commit | 38b3b8f7395d6717efd570a62dc1c2c085d1b049 (patch) | |
tree | 7a3c96831a6a93fa2595eb695092778e53ef9447 | |
parent | 5779b6e198c0dd22a99e12837faea4b5e8b2664f (diff) | |
download | mongo-38b3b8f7395d6717efd570a62dc1c2c085d1b049.tar.gz |
SERVER-5625 don't throw on problem setting shard version on initial connect
-rw-r--r-- | src/mongo/s/shardconnection.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/s/shardconnection.cpp b/src/mongo/s/shardconnection.cpp index 6d21234071a..2ef03996367 100644 --- a/src/mongo/s/shardconnection.cpp +++ b/src/mongo/s/shardconnection.cpp @@ -33,6 +33,8 @@ namespace mongo { + MONGO_EXPORT_SERVER_PARAMETER(ignoreInitialVersionFailure, bool, false); + DBConnectionPool shardConnectionPool; class ClientConnections; @@ -254,7 +256,14 @@ namespace mongo { warning() << "problem while initially checking shard versions on" << " " << shard.getName() << causedBy(e) << endl; - throw; + + if ( !ignoreInitialVersionFailure ) { + throw; + } + else { + // We swallow the error here, checking shard version here is a heuristic to + // prevent later stale config exceptions, not required for correctness. + } } } } |