-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Cluster Scalability
-
Fully Compatible
-
Cluster Scalability 2024-4-1
After every command, a hook runs that checks if the command should be mirrored to a secondary. That hook gets the CommandInvocation opCtx decoration, which is a shared pointer returned by value, so we're constructing/destructing it even for requests that can't be mirrored or aren't chosen to be sampled. We should be able to avoid this and only make a new shared pointer when an operation will actually be sampled.