summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/storage_engine_impl.cpp
diff options
context:
space:
mode:
authorTrevor Guidry <trevor.guidry@mongodb.com>2022-09-16 19:00:42 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-20 18:00:27 +0000
commitbc998019c79c83db140317c3e59761fdd12a8c5f (patch)
tree2d6ce6aafdf155f07fd403c9fff7454c86a8f09f /src/mongo/db/storage/storage_engine_impl.cpp
parent03bf5f2dff26f3d5c3ca4687c565c3c764bcc013 (diff)
downloadmongo-bc998019c79c83db140317c3e59761fdd12a8c5f.tar.gz
SERVER-69581 add performance-for-range-copy check to clang-tidy
Diffstat (limited to 'src/mongo/db/storage/storage_engine_impl.cpp')
-rw-r--r--src/mongo/db/storage/storage_engine_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/storage/storage_engine_impl.cpp b/src/mongo/db/storage/storage_engine_impl.cpp
index 66a4e36183b..2743c014c96 100644
--- a/src/mongo/db/storage/storage_engine_impl.cpp
+++ b/src/mongo/db/storage/storage_engine_impl.cpp
@@ -654,7 +654,7 @@ StatusWith<StorageEngine::ReconcileResult> StorageEngineImpl::reconcileCatalogAn
// other contexts such as `recoverToStableTimestamp`.
std::vector<DurableCatalog::Entry> catalogEntries = _catalog->getAllCatalogEntries(opCtx);
if (!_options.forRepair) {
- for (DurableCatalog::Entry entry : catalogEntries) {
+ for (const DurableCatalog::Entry& entry : catalogEntries) {
if (engineIdents.find(entry.ident) == engineIdents.end()) {
return {ErrorCodes::UnrecoverableRollbackError,
str::stream() << "Expected collection does not exist. Collection: "
@@ -668,7 +668,7 @@ StatusWith<StorageEngine::ReconcileResult> StorageEngineImpl::reconcileCatalogAn
//
// Also, remove unfinished builds except those that were background index builds started on a
// secondary.
- for (DurableCatalog::Entry entry : catalogEntries) {
+ for (const DurableCatalog::Entry& entry : catalogEntries) {
std::shared_ptr<BSONCollectionCatalogEntry::MetaData> metaData =
_catalog->getMetaData(opCtx, entry.catalogId);
NamespaceString nss(metaData->nss);