[SERVER-74116] Use batched writes when inserting and updating logical sessions Created: 16/Feb/23 Updated: 13/Apr/23 Resolved: 13/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Shin Yee Tan | Assignee: | Shin Yee Tan |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Sprint: | Execution Team 2023-04-03, Execution Team 2023-04-17 |
| Participants: |
| Description |
|
Currently when we refresh sessions, there are inserts and updates to the sessions collection that we write to the oplog. We can use batched writes to batch these upserts into an applyOps. Things to consider:
|
| Comments |
| Comment by Shin Yee Tan [ 13/Apr/23 ] |
|
To answer the previous question, we are able to batch inserts that call the write unit of work more directly and are not going through the regular query path. Trying to refactor how sessions refresh may introduce more tech debt and the more ideal and generalized approach would be to introduce batching logic at the query level. A BatchedUpdateStage/BatchedUpsertStage would enable fully utilizing the batching functionality we have. Thus, I am closing this ticket in favor of SERVER-76055. |
| Comment by Shin Yee Tan [ 30/Mar/23 ] |
|
After poking around the codebase, some things I want to note down are:
|