[SERVER-85465] Improve RecordStore seekNear API Created: 19/Jan/24 Updated: 07/Feb/24 |
|
| Status: | In Progress |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Wei Hu |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | perf-8.0 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||||||
| Sprint: | Execution Team 2024-02-05, Execution Team 2024-02-19 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
The seekNear API has bizarre semantics that requires the implementation to moving the cursor back and forth to return the correct key. If seekNear returns a previous key, then the caller has to call next() to advance. Replace this API or create another with lower_bound and upper_bound semantics to speed up seeks on both the oplog and clustered collections. Consider using bounded cursors here. As a specific goal, this would mean clustered collections scans only need to make one API call into the cursor when seeking. See this comment. |