diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-03-14 16:31:36 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-03-15 15:49:41 -0400 |
commit | 6210410de52b7695ffd2415ee2f1dea0374d24b2 (patch) | |
tree | a591bfc983193d50519f2e7bacffa2020d81bd02 /src/mongo/db/s/sharded_connection_info.h | |
parent | b00065bafe48633f47a04f61c29abf71b1b4f075 (diff) | |
download | mongo-6210410de52b7695ffd2415ee2f1dea0374d24b2.tar.gz |
SERVER-23110 dbeval should not access collection sharding state
Diffstat (limited to 'src/mongo/db/s/sharded_connection_info.h')
-rw-r--r-- | src/mongo/db/s/sharded_connection_info.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mongo/db/s/sharded_connection_info.h b/src/mongo/db/s/sharded_connection_info.h index 4cc22fa3963..4cfae41c263 100644 --- a/src/mongo/db/s/sharded_connection_info.h +++ b/src/mongo/db/s/sharded_connection_info.h @@ -49,10 +49,19 @@ public: ShardedConnectionInfo(); ~ShardedConnectionInfo(); - const ChunkVersion getVersion(const std::string& ns) const; + static ShardedConnectionInfo* get(Client* client, bool create); + + /** + * Returns the shard version associated with the specified namespace on this connection. If no + * version is associated with the namespace returns ChunkVersion::UNSHARDED. + */ + ChunkVersion getVersion(const std::string& ns) const; + + /** + * Assigns a new version on the connection to the specified namespace. + */ void setVersion(const std::string& ns, const ChunkVersion& version); - static ShardedConnectionInfo* get(Client* client, bool create); static void reset(Client* client); static void addHook(); |