[SERVER-79203] Refactor `ServiceEntryPointImpl` and split it into `SessionManager` Created: 21/Jul/23  Updated: 29/Oct/23  Resolved: 08/Sep/23

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Assigned Teams:
Service Arch
Backwards Compatibility: Minor Change
Sprint: Service Arch 2023-08-07, Service Arch 2023-09-04, Security 2023-09-18
Participants:
Linked BF Score: 151

 Description   

The base class for ServiceEntryPoint is mixing two separate services:

  • SessionManager that should be responsible for accepting new connections/streams and providing them with their own instance of SessionWorkflow. All the virtual interfaces defined by the base class concern managing sessions, except for two: handleRequest and slowSessionWorkflowLogSeverity.
  • ServiceEntryPoint that should provide the interface for accessing the database (e.g., through ServiceEntryPointCommon::handleRequest).

We should reorganize this hierarchy by:

  • Splitting SessionManager into its own class, and having ServiceContext own a single instance of SessionManager. Initially, we'll only need two implementations of SessionManager since mongod and mongos have slightly different implementations for this class today. We also need to implement an extension for Mongo embedded similar to how it's implemented today.
  • Merging ServiceEntryPointCommon with ServiceEntryPoint, and making ServiceEntryPointMongod, ServiceEntryPointEmbedded, and ServiceEntryPointMongos have that as their base class.

There are also three tests that must be adjusted as part of this modification/refactoring.



 Comments   
Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-79203 Split SessionManager from ServiceEntryPoint
Branch: master
https://github.com/mongodb/mongo/commit/c83c6e99355e9f4e6fe959f1718a7db94ea3f524

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Uladzimir Makouski', 'email': 'uladzimir.makouski@mongodb.com', 'username': 'umakouski'}

Message: Revert "SERVER-79203 Split SessionManager from ServiceEntryPoint"

This reverts commit b7e79fc47861dbf9b9e6f129cc36dc7d98634794.
Branch: master
https://github.com/mongodb/mongo/commit/63199295a3152a8dbde645ca95f69d92aa3f30f6

Comment by Githook User [ 08/Sep/23 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-79203 Split SessionManager from ServiceEntryPoint
Branch: master
https://github.com/mongodb/mongo/commit/b7e79fc47861dbf9b9e6f129cc36dc7d98634794

Generated at Thu Feb 08 06:40:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.