[SERVER-69355] Add support for reusing cursors in Collections API Created: 01/Sep/22 Updated: 14/Aug/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jordi Olivares Provencio | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Storage Execution
|
||||||||
| Participants: | |||||||||
| Description |
|
Nowadays the operations performed using the Collections API are all independent. If we want to do a read-modify-write sequence of operations we will use two separate WT cursors: one for obtaining the document, and another to write the changes. This is inefficient as the second cursor will need to be positioned to the same location as the first one. Ideally we should be able to reuse the first one to perform the write as it is already positioned where it will perform the update. This should improve performance by avoiding unnecessary cursor operations. |