Use the priority port in runCmdOnPrimaryAndAwaitResponse

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2026-03-16
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      During the introduction of the priority port, we were fairly restrictive with which operations we moved to use the priority port internally. We only moved operations which were critical to supporting how replication functions (heartbeats, replication syncing, etc.) and excluded operations which are not fully critical to the server's operation (index builds, noop writes, etc).

      However, we saw performance regressions from this decision, specifically with respect to index builds. Because the main port was no longer being used frequently, committing an index build required a new connection to be created on the main port, which added 5-10ms of latency to the index build.

      Given that all of the users of the `runCmdOnPrimaryAndAwaitResponse` function are running lightweight commands (votes for different commits, oplog note writing, single document inserts and deletes), this ticket proposes to port this function also to use the priority port. It should not negatively impact the port since it will almost always reuse existing connections from the replication internals, and it will prevent use from seeing degraded performance for those operations.

            Assignee:
            Allison Easton
            Reporter:
            Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: