diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2018-02-01 07:39:32 +0000 |
---|---|---|
committer | Kevin Pulo <kevin.pulo@mongodb.com> | 2018-02-01 07:39:32 +0000 |
commit | 6476d7205b2bf4a8d02bf877bb84f1290878bb04 (patch) | |
tree | 643d0826ea220b521e605d3f537b7b978eec3a83 /src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp | |
parent | ad7235f3b739c3aeb0c21ddaba58fd1cb494cc61 (diff) | |
download | mongo-6476d7205b2bf4a8d02bf877bb84f1290878bb04.tar.gz |
SERVER-18137 Use NamespaceString for fully-qualified ns in sharding
Diffstat (limited to 'src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp')
-rw-r--r-- | src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp index c00455f05cd..5e89baca4e1 100644 --- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp @@ -86,12 +86,11 @@ StatusWith<DistributionStatus> createCollectionDistributionStatus( Grid::get(opCtx)->catalogClient()->getTagsForCollection(opCtx, chunkMgr->getns()); if (!swCollectionTags.isOK()) { return swCollectionTags.getStatus().withContext( - str::stream() << "Unable to load tags for collection " << chunkMgr->getns()); + str::stream() << "Unable to load tags for collection " << chunkMgr->getns().ns()); } const auto& collectionTags = swCollectionTags.getValue(); - DistributionStatus distribution(NamespaceString(chunkMgr->getns()), - std::move(shardToChunksMap)); + DistributionStatus distribution(chunkMgr->getns(), std::move(shardToChunksMap)); // Cache the collection tags const auto& keyPattern = chunkMgr->getShardKeyPattern().getKeyPattern(); @@ -298,8 +297,8 @@ BalancerChunkSelectionPolicyImpl::selectSpecificChunkToMove(OperationContext* op const auto& shardStats = shardStatsStatus.getValue(); auto routingInfoStatus = - Grid::get(opCtx)->catalogCache()->getShardedCollectionRoutingInfoWithRefresh( - opCtx, NamespaceString(chunk.getNS())); + Grid::get(opCtx)->catalogCache()->getShardedCollectionRoutingInfoWithRefresh(opCtx, + chunk.getNS()); if (!routingInfoStatus.isOK()) { return routingInfoStatus.getStatus(); } @@ -327,8 +326,8 @@ Status BalancerChunkSelectionPolicyImpl::checkMoveAllowed(OperationContext* opCt auto shardStats = std::move(shardStatsStatus.getValue()); auto routingInfoStatus = - Grid::get(opCtx)->catalogCache()->getShardedCollectionRoutingInfoWithRefresh( - opCtx, NamespaceString(chunk.getNS())); + Grid::get(opCtx)->catalogCache()->getShardedCollectionRoutingInfoWithRefresh(opCtx, + chunk.getNS()); if (!routingInfoStatus.isOK()) { return routingInfoStatus.getStatus(); } |