[SERVER-71517] Coverity analysis defect 134186: AUTO_CAUSES_COPY Created: 21/Nov/22  Updated: 29/Oct/23  Resolved: 05/Dec/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Mathis Bessa
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-11-21 at 10.07.33 AM.png    
Issue Links:
Problem/Incident
is caused by SERVER-71179 Update the ShardSplitCommands to use ... Closed
Related
related to SERVER-71184 Shard Split State Document to use arr... Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-12-12
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/serverless/shard_split_commands.cpp:69: AUTO_CAUSES_COPY 134186 Using the "auto" keyword without an "&" causes the copy of an object of type TenantId.



 Comments   
Comment by Mathis Bessa [ 05/Dec/22 ]

Done as part of this commit when working on SERVER-71184

Comment by Mathis Bessa [ 29/Nov/22 ]

This will be fixed in SERVER-71184

Leaving this ticket open for now until SERVER-71184 is merged to master.

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