diff options
author | gregs <greg@10gen.com> | 2011-11-10 18:38:30 -0500 |
---|---|---|
committer | gregs <greg@10gen.com> | 2011-11-10 18:38:30 -0500 |
commit | e5cd12cde3104326e9572880a0a4fbaded04d612 (patch) | |
tree | e6591cef519923156887837669aaebc52ce9e2b0 | |
parent | d1854d7b70c8b5e02a65ca71ee877a463ac35ca7 (diff) | |
download | mongo-e5cd12cde3104326e9572880a0a4fbaded04d612.tar.gz |
fix for backwards compatibility and shard versioning SERVER-4240
-rw-r--r-- | s/shard_version.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/s/shard_version.cpp b/s/shard_version.cpp index 35a970cf28a..496b9828b18 100644 --- a/s/shard_version.cpp +++ b/s/shard_version.cpp @@ -134,6 +134,14 @@ namespace mongo { bool ok = conn->runCommand( "admin" , cmd , result ); + // HACK for backwards compatibility with v1.8.x, v2.0.0 and v2.0.1 + // Result is false, but will still initialize serverID and configdb + if( ! ok && ! result["errmsg"].eoo() && ( result["errmsg"].String() == "need to specify namespace"/* 2.0.1/2 */ || + result["errmsg"].String() == "need to speciy namespace" /* 1.8 */ )) + { + ok = true; + } + LOG(3) << "initial sharding result : " << result << endl; return ok; |