[SERVER-63365] Defragmentation action objects are unnecessarily copied while processed by the Balancer Created: 07/Feb/22  Updated: 29/Oct/23  Resolved: 08/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.0

Type: Bug Priority: Major - P3
Reporter: Paolo Polato Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-02-21
Participants:

 Description   

The logic implemented by the balancer to retrieve, submit and acknowledge defragmentation commands from the policy involves multiple object copies (1, 2) that could be replaced with {{std::move()}}s.

The case of SplitInfo is particularly problematic, as it might involve the copy of a std::vector<BSONObjs> containing thousands of elements.



 Comments   
Comment by Githook User [ 08/Feb/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-63365 Reduce number of object copy in balancer secondary thread
Branch: master
https://github.com/mongodb/mongo/commit/d41c79fa781942f55c55eac302fd472f3169857d

Generated at Thu Feb 08 05:57:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.