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

CommandHelpers::runCommandInvocation and similar functions should not grab a shared_ptr to CommandInvocationHooks

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • Service Arch 2022-03-07, Service Arch 2022-03-21
    • 130

    Description

       This was discovered while investigating BF-24415

      In commands.cpp, CommandHelpers::runCommandInvocation, we do:

      auto hooks = getCommandInvocationHooksHandle(opCtx->getServiceContext());
      

      Given that the ServiceContext keeps keeps the CommandInvocationHooks alive, there is no need for hooks to be a shared_ptr. getCommandInvocationHooksHandle should not cause us to Incref and Decref. 

      We don't expect for this to address the root cause of BF-BF-24415, but we do expect it to manifest more clearly if we introduce this change.

      Attachments

        Activity

          People

            matt.diener@mongodb.com Matt Diener (Inactive)
            matt.diener@mongodb.com Matt Diener (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: