[SERVER-52974] Checking if destined recipient has changed for resharding creates another full copy of the updated document Created: 20/Nov/20 Updated: 29/Oct/23 Resolved: 21/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Max Hirschhorn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-234-M2, PM-234-T-oplog-fetch | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Sprint: | Sharding 2020-11-30 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||
| Description |
|
mutablebson::Document::getObject() renders a full copy of the updated document. This can be expensive for larger documents. At minimum we should skip calling it when the collection isn't even sharded like UpdateStage::checkUpdateChangesShardKeyFields() does. Better would be to consolidate some the _doc.getObject() calls that UpdateStage::checkUpdateChangesShardKeyFields(), UpdateStage::wasReshardingKeyUpdated(), and updates which weren't performed in-place all do. |
| Comments |
| Comment by Githook User [ 21/Nov/20 ] |
|
Author: {'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}Message: |