-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2022-03-07, Service Arch 2022-03-21
-
130
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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.