From 6210410de52b7695ffd2415ee2f1dea0374d24b2 Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Mon, 14 Mar 2016 16:31:36 -0400 Subject: SERVER-23110 dbeval should not access collection sharding state --- src/mongo/db/s/sharded_connection_info.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/s/sharded_connection_info.h') 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(); -- cgit v1.2.1