diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-08-06 13:26:55 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-08-12 11:27:43 -0400 |
commit | be7db282c80c981882ea67f909eb6be4e53d2d4b (patch) | |
tree | 615bcfdcc2e25e5db24b4d82f3db7cff1f9c4f91 /src/mongo/s/chunk_manager.h | |
parent | 86a3e6352eb27fd2e6115299bcec5103a830fe36 (diff) | |
download | mongo-be7db282c80c981882ea67f909eb6be4e53d2d4b.tar.gz |
SERVER-19543 Thread OperationContext through to everywhere that accesses the CatalogManager
Diffstat (limited to 'src/mongo/s/chunk_manager.h')
-rw-r--r-- | src/mongo/s/chunk_manager.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/s/chunk_manager.h b/src/mongo/s/chunk_manager.h index cb68b42b858..0ca94237920 100644 --- a/src/mongo/s/chunk_manager.h +++ b/src/mongo/s/chunk_manager.h @@ -42,6 +42,7 @@ class CanonicalQuery; class ChunkManager; class CollectionType; struct QuerySolutionNode; +class OperationContext; typedef std::shared_ptr<ChunkManager> ChunkManagerPtr; @@ -159,12 +160,13 @@ public: // // Creates new chunks based on info in chunk manager - void createFirstChunks(const ShardId& primaryShardId, + void createFirstChunks(OperationContext* txn, + const ShardId& primaryShardId, const std::vector<BSONObj>* initPoints, const std::set<ShardId>* initShardIds); // Loads existing ranges based on info in chunk manager - void loadExistingRanges(const ChunkManager* oldManager); + void loadExistingRanges(OperationContext* txn, const ChunkManager* oldManager); // Helpers for load @@ -190,7 +192,7 @@ public: * when the shard key is {a : "hashed"}, you can call * findIntersectingChunk() on {a : hash("foo") } */ - ChunkPtr findIntersectingChunk(const BSONObj& shardKey) const; + ChunkPtr findIntersectingChunk(OperationContext* txn, const BSONObj& shardKey) const; void getShardIdsForQuery(std::set<ShardId>& shardIds, const BSONObj& query) const; void getAllShardIds(std::set<ShardId>* all) const; @@ -238,11 +240,13 @@ public: int getCurrentDesiredChunkSize() const; - std::shared_ptr<ChunkManager> reload(bool force = true) const; // doesn't modify self! + std::shared_ptr<ChunkManager> reload(OperationContext* txn, + bool force = true) const; // doesn't modify self! private: // returns true if load was consistent - bool _load(ChunkMap& chunks, + bool _load(OperationContext* txn, + ChunkMap& chunks, std::set<ShardId>& shardIds, ShardVersionMap* shardVersions, const ChunkManager* oldManager); |