Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-67218

Remove ServiceStateMachine::setCleanupHook

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • Service Arch 2022-06-27
    • 124

    Description

      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

      Attachments

        Activity

          People

            billy.donahue@mongodb.com Billy Donahue
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: