summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAllison Easton <allison.easton@mongodb.com>2022-03-10 14:53:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-10 15:42:50 +0000
commit659ed4c8593016dc7157c0117de18ce916ef8d42 (patch)
tree2c0ff7da3c0187a0539420e0064a52c89d405eb3 /src
parent3a8cf3d2d1c6f668607756ab0b972f9ca2148f18 (diff)
downloadmongo-659ed4c8593016dc7157c0117de18ce916ef8d42.tar.gz
SERVER-61678 Avoid copying vectors of split points
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/s/auto_split_vector.cpp2
-rw-r--r--src/mongo/db/s/auto_split_vector_command.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/s/auto_split_vector.cpp b/src/mongo/db/s/auto_split_vector.cpp
index c343cbed7f2..ecb2b568c38 100644
--- a/src/mongo/db/s/auto_split_vector.cpp
+++ b/src/mongo/db/s/auto_split_vector.cpp
@@ -351,7 +351,7 @@ std::pair<std::vector<BSONObj>, bool> autoSplitVector(OperationContext* opCtx,
"duration"_attr = Milliseconds(elapsedMillisToFindSplitPoints));
}
- return std::make_pair(splitKeys, reachedMaxBSONSize);
+ return std::make_pair(std::move(splitKeys), reachedMaxBSONSize);
}
} // namespace mongo
diff --git a/src/mongo/db/s/auto_split_vector_command.cpp b/src/mongo/db/s/auto_split_vector_command.cpp
index 1681c011f97..821527cac7d 100644
--- a/src/mongo/db/s/auto_split_vector_command.cpp
+++ b/src/mongo/db/s/auto_split_vector_command.cpp
@@ -85,7 +85,7 @@ public:
req.getMin(),
req.getMax(),
req.getMaxChunkSizeBytes());
- Response autoSplitVectorResponse(splitPoints);
+ Response autoSplitVectorResponse(std::move(splitPoints));
autoSplitVectorResponse.setContinuation(continuation);
return autoSplitVectorResponse;
}