-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
Service Arch 2022-06-27
-
124
This hook allows an arbitrary listener to monitor for ServiceStateMachine cleanup.
But the only user is ServiceEntryPointImpl, which creates and owns all ServiceStateMachine instances, and already has an onClientDisconnect hook.
ServiceStateMachine disconnects its Client as part of its cleanup process, and part of this is calling the ServiceEntryPoint::onClientDisconnect(Client*) virtual function AND THEN the installed _cleanupHook if any.
The Mongod ServiceEntryPointImpl doesn't override onClientDisconnect, but does install a ssm.setCleanupHook.
ServiceEntryPointMongos is the opposite: it doesn't install a ssm.setCleanupHook but DOES override onClientDisconnect.
If there's some reason the onClientDisconnect must be followed by a LATER call to the installed cleanupHook we should clearly document that and change the SEP to have two SEP Client cleanup notifications with the same style of API. I suspect that we could probably be able to just combine them under the existing onClientDisconnect callback and remove ServiceStateMachine::setCleanupHook.
PM-2766
- related to
-
SERVER-67230 ServiceEntryPoint accepts 1 more session than it should
- Closed