summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/column_store_sorter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/index/column_store_sorter.cpp')
-rw-r--r--src/mongo/db/index/column_store_sorter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/index/column_store_sorter.cpp b/src/mongo/db/index/column_store_sorter.cpp
index f708518a560..ef82ad9bf13 100644
--- a/src/mongo/db/index/column_store_sorter.cpp
+++ b/src/mongo/db/index/column_store_sorter.cpp
@@ -82,7 +82,7 @@ ColumnStoreSorter::ColumnStoreSorter(size_t maxMemoryUsageBytes,
_maxMemoryUsageBytes(maxMemoryUsageBytes),
_spillFile(std::make_shared<Sorter<Key, Value>::File>(pathForNewSpillFile(), _stats)) {}
-void ColumnStoreSorter::add(PathView path, RecordId recordId, CellView cellContents) {
+void ColumnStoreSorter::add(PathView path, const RecordId& recordId, CellView cellContents) {
auto& cellListAtPath = _dataByPath[path];
if (cellListAtPath.empty()) {
// Track memory usage of this new path.
@@ -181,7 +181,7 @@ void ColumnStoreSorter::spill() {
writer.writeChunk();
currentChunkSize = 0;
}
- for (auto ridAndCell : cellVector) {
+ for (auto& ridAndCell : cellVector) {
const auto& cell = ridAndCell.second;
currentChunkSize += path.size() + ridAndCell.first.memUsage() + cell.size();
writer.addAlreadySorted(Key{path, ridAndCell.first},