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

Miscellaneous cleanup in router command path

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Cluster Scalability 2023-12-25, Cluster Scalability 2024-1-22, Cluster Scalability 2024-2-5, Cluster Scalability 2024-2-19, Cluster Scalability 2024-3-4

      While profiling for invisible sharding performance, I noticed a few small things that can be improved in the router command path that likely won't move the needle but are simple to do:

      1. TrackingMetadata initializes an OID for every request, which increments an atomic, but doesn't use it unless tracking verbosity is on and the command uses a ShardRemote.
      2. Getting the connection string from a Shard type returns a copy and is used pretty often.
      3. The bulk write path maintains a map of written opTimes from ConnectionString to opTime, which is never used.

            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: