[SERVER-83914] Ensure safe SessionCatalog initialization and use in embedded router mode Created: 05/Dec/23 Updated: 23/Jan/24 Resolved: 23/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | George Wangensteen | Assignee: | Pol Pinol |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | pm-635-milestone-1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Service Arch
|
| Sprint: | CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-02-05 |
| Participants: |
| Description |
|
We need to ensure and document the access-pattern and types that will be used to represent the SessionCatalog when mongod is running in embedded router mode. I think it is safe to only have one in-memory SessionCatalog, and re-use the existing MongodSessionCatalog. We will just need to ensure that the reaping functionality in the RouterSessionCatalog here: https://github.com/mongodb/mongo/blob/a37dd902790b062a41fa87aacf57adce8ba503e6/src/mongo/s/session_catalog_router.cpp#L45 is preserved, that all Router operations use RouterOperationContextSession, and that yielding is performed when needed to ensure we don't deadlock trying to check out a session we already are using. This ticket tracks whatever code changes are necessary to initialize and use the SessionCatalog correctly in embedded router mode, as well as documenting the decision and explaining it in the arch guide or elsewhere. |
| Comments |
| Comment by Pol Pinol [ 23/Jan/24 ] |
|
This ticket can be closed as Works as Designed because there is no work to do in for the SessionCatalog in an embedded router world.
The only "remaining" work is to properly handle 'reapSessionolderThan', that it is included in |