summaryrefslogtreecommitdiff
path: root/src/mongo/db/client.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-09-25 14:08:28 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-09-25 22:13:39 -0400
commita1f9188b4d58daa4e80a344116dbd85b636962da (patch)
treebee3a3f252ef90ef97a052a4b07c8621fa31ea5a /src/mongo/db/client.cpp
parente402881e004283d292dd3e483a9df1dbd2b066e2 (diff)
downloadmongo-a1f9188b4d58daa4e80a344116dbd85b636962da.tar.gz
SERVER-14668 Use ensureShardVersionOKOrThrow for collection shard version checking
This commit exposes a SendStaleConfigException-based method for checking shard staleness. This will be used in all methods (other than the batch executor). Also clean-up some unnecessary includes.
Diffstat (limited to 'src/mongo/db/client.cpp')
-rw-r--r--src/mongo/db/client.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index 779f21fe0e9..812e062ede9 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -59,7 +59,6 @@
#include "mongo/db/storage_options.h"
#include "mongo/s/chunk_version.h"
#include "mongo/s/d_state.h"
-#include "mongo/s/stale_exception.h" // for SendStaleConfigException
#include "mongo/scripting/engine.h"
#include "mongo/util/concurrency/thread_name.h"
#include "mongo/util/file_allocator.h"
@@ -255,14 +254,7 @@ namespace mongo {
case dbDelete:
break;
default: {
- string errmsg;
- ChunkVersion received;
- ChunkVersion wanted;
- if ( ! shardVersionOk( _ns , errmsg, received, wanted ) ) {
- ostringstream os;
- os << "[" << _ns << "] shard version not ok in Client::Context: " << errmsg;
- throw SendStaleConfigException( _ns, os.str(), received, wanted );
- }
+ ensureShardVersionOKOrThrow(_ns);
}
}
}