[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: |