[SERVER-73637] Coverity analysis defect 135034: AUTO_CAUSES_COPY Created: 06/Feb/23  Updated: 02/Aug/23

Status: Blocked
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-73860 Add performance-unnecessary-copy-init... Backlog
Problem/Incident
is caused by SERVER-73529 Refactor _performTimeseriesWrite code... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/ops/write_ops_exec.cpp:2110: AUTO_CAUSES_COPY 135034 Using the "auto" keyword without an "&" causes the copy of an object of type reference_wrapper.


Generated at Thu Feb 08 06:25:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.