diff options
Diffstat (limited to 'src/mongo/s/commands/cluster_split_collection_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_split_collection_cmd.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/s/commands/cluster_split_collection_cmd.cpp b/src/mongo/s/commands/cluster_split_collection_cmd.cpp index fd5f462518c..06a50c1d3cf 100644 --- a/src/mongo/s/commands/cluster_split_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_split_collection_cmd.cpp @@ -108,14 +108,14 @@ public: result, Status(ErrorCodes::InvalidNamespace, "no namespace specified")); } - auto status = grid.catalogCache()->getDatabase(nss.db().toString()); + auto status = grid.catalogCache()->getDatabase(txn, nss.db().toString()); if (!status.isOK()) { return appendCommandStatus(result, status.getStatus()); } std::shared_ptr<DBConfig> config = status.getValue(); if (!config->isSharded(nss.ns())) { - config->reload(); + config->reload(txn); if (!config->isSharded(nss.ns())) { return appendCommandStatus(result, @@ -178,7 +178,7 @@ public: } // This refreshes the chunk metadata if stale. - ChunkManagerPtr info = config->getChunkManager(nss.ns(), true); + ChunkManagerPtr info = config->getChunkManager(txn, nss.ns(), true); ChunkPtr chunk; if (!find.isEmpty()) { @@ -195,7 +195,7 @@ public: return false; } - chunk = info->findIntersectingChunk(shardKey); + chunk = info->findIntersectingChunk(txn, shardKey); invariant(chunk.get()); } else if (!bounds.isEmpty()) { if (!info->getShardKeyPattern().isShardKey(bounds[0].Obj()) || @@ -210,7 +210,7 @@ public: BSONObj minKey = info->getShardKeyPattern().normalizeShardKey(bounds[0].Obj()); BSONObj maxKey = info->getShardKeyPattern().normalizeShardKey(bounds[1].Obj()); - chunk = info->findIntersectingChunk(minKey); + chunk = info->findIntersectingChunk(txn, minKey); invariant(chunk.get()); if (chunk->getMin().woCompare(minKey) != 0 || chunk->getMax().woCompare(maxKey) != 0) { @@ -235,7 +235,7 @@ public: return appendCommandStatus(result, status); } - chunk = info->findIntersectingChunk(middle); + chunk = info->findIntersectingChunk(txn, middle); invariant(chunk.get()); if (chunk->getMin().woCompare(middle) == 0 || chunk->getMax().woCompare(middle) == 0) { @@ -252,7 +252,7 @@ public: BSONObj res; if (middle.isEmpty()) { - Status status = chunk->split(Chunk::atMedian, NULL, NULL); + Status status = chunk->split(txn, Chunk::atMedian, NULL, NULL); if (!status.isOK()) { errmsg = "split failed"; result.append("cause", status.toString()); @@ -262,7 +262,7 @@ public: vector<BSONObj> splitPoints; splitPoints.push_back(middle); - Status status = chunk->multiSplit(splitPoints, NULL); + Status status = chunk->multiSplit(txn, splitPoints, NULL); if (!status.isOK()) { errmsg = "split failed"; result.append("cause", status.toString()); |