ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Networking & Observability
    • Fully Compatible
    • ALL
    • N&O 2026-10-26, N&O 2026-11-09
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      jstests/noPassthrough/network/max_time_ms_mongos_deadline.js asserts that mongos creates no new egress connections while a find hits MaxTimeMSExpired on the shard. Its helper getShardHostPoolStats() sums connPoolStats.hosts over every host, including the config server replica set members.

      Shortly after startup, mongos issues config reads with nearest read preference. When such a read lands on a config node that has no pooled connection yet, mongos opens a new connection to it. If that happens during the find, the test reports it as churn (totalCreated 7 -> 8) even though the shard connection is reused correctly.

      Whether this read lands inside the test window depends on a startup race: if mongosMain's signing-key check runs before the keys-monitor's first refresh completes, mongos sleeps 1s in waitForSigningKeys and the read happens before the "before" snapshot. If the refresh wins, mongos becomes ready immediately and the read overlaps the find.

      Fix

      Restrict the helper to the shard's hosts (st.rs0.nodes), as predictive_connpool.js does for its known host list.

            Assignee:
            Sergei Bazhenov
            Reporter:
            Sergei Bazhenov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: