diff options
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_util.cpp')
| -rw-r--r-- | src/mongo/db/s/resharding/resharding_util.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/s/resharding/resharding_util.cpp b/src/mongo/db/s/resharding/resharding_util.cpp index 3e0db3b383e..27d319264dd 100644 --- a/src/mongo/db/s/resharding/resharding_util.cpp +++ b/src/mongo/db/s/resharding/resharding_util.cpp @@ -38,7 +38,7 @@ #include "mongo/bson/bsonobj.h" #include "mongo/bson/json.h" #include "mongo/bson/util/bson_extract.h" -#include "mongo/db/concurrency/exception_util.h" +#include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/exec/document_value/document.h" #include "mongo/db/namespace_string.h" #include "mongo/db/op_observer.h" @@ -207,14 +207,11 @@ void checkForOverlappingZones(std::vector<ReshardingZoneType>& zones) { } std::vector<BSONObj> buildTagsDocsFromZones(const NamespaceString& tempNss, - const std::vector<ReshardingZoneType>& zones, - const ShardKeyPattern& shardKey) { + const std::vector<ReshardingZoneType>& zones) { std::vector<BSONObj> tags; tags.reserve(zones.size()); - for (auto& zone : zones) { - auto min = shardKey.getKeyPattern().extendRangeBound(zone.getMin(), false); - auto max = shardKey.getKeyPattern().extendRangeBound(zone.getMax(), false); - ChunkRange range(min, max); + for (const auto& zone : zones) { + ChunkRange range(zone.getMin(), zone.getMax()); TagsType tag(tempNss, zone.getZone().toString(), range); tags.push_back(tag.toBSON()); } |
