[SERVER-68812] Coverity analysis defect 122617: AUTO_CAUSES_COPY Created: 14/Aug/22  Updated: 29/Oct/23  Resolved: 22/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Vesselina Ratcheva (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2022-08-22, Repl 2022-09-05
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/repl/initial_syncer.cpp:438: AUTO_CAUSES_COPY 122617 Using the "auto" keyword without an "&" causes the copy of an object of type Stats.



 Comments   
Comment by Githook User [ 22/Aug/22 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-68812 Prevent extra Stats copies in InitialSyncer::_appendInitialSyncProgressMinimal_inlock
Branch: master
https://github.com/mongodb/mongo/commit/aee98e08bc61c76abdf21fc9e8e1b508fab87251

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