[SERVER-55942] Avoid sorting metadata object in BucketCatalog::insert by storing multiple entries in _openBuckets Created: 08/Apr/21 Updated: 29/Oct/23 Resolved: 27/Apr/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc0 |
| Type: | Task | 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-04-19, Execution Team 2021-05-03 | ||||||||
| Participants: | |||||||||
| Description |
|
Sorting the metadata in BucketCatalog::insert can be an quite expensive operation. This is done so we can perform binary comparison to lookup bucket independently of user provided field order. As an alternative approach that may perform better is to store multiple entries in the _openBuckets hash map that point to the same bucket to handle different sort orders. We can lazily normalize and retry the lookup if the first lookup failed. |
| Comments |
| Comment by Githook User [ 27/Apr/21 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: Lazily normalize key on insert when un-normalized is not found. |