[SERVER-60181] Applying insert-only doc-diffs should not require insert in StringMap Created: 23/Sep/21 Updated: 29/Oct/23 Resolved: 12/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Henrik Edin | Assignee: | Henrik Edin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Sprint: | Execution Team 2021-10-18 | ||||
| Participants: | |||||
| Linked BF Score: | 135 | ||||
| Description |
|
When preparing the docDiff for apply we put the insert field in a StringMap: https://github.com/mongodb/mongo/blob/92738c5fa0e8169299e5393e88159b8cbb9559ca/src/mongo/db/update/document_diff_applier.cpp#L106 However, if it is an insert-only workload this map is not used and we just read from the insert vector: https://github.com/mongodb/mongo/blob/92738c5fa0e8169299e5393e88159b8cbb9559ca/src/mongo/db/update/document_diff_applier.cpp#L495-L504 This should cut a StringMap insert for every measurement in time-series inserts. |
| Comments |
| Comment by Githook User [ 08/Oct/21 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: Also fix usage of reserveBytes when applying docDiff. Reserved bytes need to be claimed. |