summaryrefslogtreecommitdiff
path: root/src/mongo/s/d_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/d_state.h')
-rw-r--r--src/mongo/s/d_state.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/s/d_state.h b/src/mongo/s/d_state.h
index 44332bafe7e..07be13aa28f 100644
--- a/src/mongo/s/d_state.h
+++ b/src/mongo/s/d_state.h
@@ -29,8 +29,6 @@
#pragma once
-#include "mongo/pch.h"
-
#include "mongo/db/jsobj.h"
#include "mongo/s/collection_metadata.h"
#include "mongo/s/chunk_version.h"
@@ -357,13 +355,15 @@ namespace mongo {
bool haveLocalShardingInfo( const std::string& ns );
/**
- * @return true if the current threads shard version is ok, or not in sharded version
- * Also returns an error message and the Config/ChunkVersions causing conflicts
+ * Validates whether the shard chunk version for the specified collection is up to date and if
+ * not, throws SendStaleConfigException.
+ *
+ * It is important (but not enforced) that method be called with the collection locked in at
+ * least IS mode in order to ensure that the shard version won't change.
+ *
+ * @param ns Complete collection namespace to be cheched.
*/
- bool shardVersionOk( const std::string& ns,
- std::string& errmsg,
- ChunkVersion& received,
- ChunkVersion& wanted );
+ void ensureShardVersionOKOrThrow(const std::string& ns);
/**
* If a migration for the chunk in 'ns' where 'obj' lives is occurring, save this log entry