summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/sharding_write_router_bm.cpp
diff options
context:
space:
mode:
authorSergi Mateo Bellido <sergi.mateo-bellido@mongodb.com>2021-09-14 13:07:52 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-05 16:21:32 +0000
commit5a6bcdf77dc1769e2542cb16957fb69073306d03 (patch)
tree52dcc115472d4a669e9f1bc164d58b75d42ef3f1 /src/mongo/db/s/sharding_write_router_bm.cpp
parent2b3e55a6af83938d4e6bade361728accc32d7018 (diff)
downloadmongo-5a6bcdf77dc1769e2542cb16957fb69073306d03.tar.gz
SERVER-58466 Minor optimization on the CatalogCache
Diffstat (limited to 'src/mongo/db/s/sharding_write_router_bm.cpp')
-rw-r--r--src/mongo/db/s/sharding_write_router_bm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/s/sharding_write_router_bm.cpp b/src/mongo/db/s/sharding_write_router_bm.cpp
index 8d354b1198c..d090a015946 100644
--- a/src/mongo/db/s/sharding_write_router_bm.cpp
+++ b/src/mongo/db/s/sharding_write_router_bm.cpp
@@ -81,7 +81,8 @@ ChunkRange getRangeForChunk(int i, int nChunks) {
RoutingTableHistoryValueHandle makeStandaloneRoutingTableHistory(RoutingTableHistory rt) {
const auto version = rt.getVersion();
return RoutingTableHistoryValueHandle(
- std::move(rt), ComparableChunkVersion::makeComparableChunkVersion(version));
+ std::make_shared<RoutingTableHistory>(std::move(rt)),
+ ComparableChunkVersion::makeComparableChunkVersion(version));
}
std::pair<std::vector<mongo::ChunkType>, mongo::ChunkManager> createChunks(