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

Avoid shared pointer copy in MirrorMaestro for non-mirrored requests

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • 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.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: