ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1024
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Debug/ASAN mongos fatals with 40474 when forwarding a sampled count or distinct whose client command already has includeQueryStatsMetrics: IDL toBSON() emits the field once, then mongos appends {{

      {includeQueryStatsMetrics: true}

      }} onto that BSON, which never replaces. The duplicate append has been there since query stats were added to these commands (SERVER-90656 / SERVER-107427); it started failing regularly after SERVER-76892 removed featureFlagQueryStatsCountDistinct (2026-08-18), because sampled router count/distinct always register query stats and take that append path. That matches jstestfuzz_concurrent_sharded (sample rate 1.0), first seen around 2026-08-21.

            Assignee:
            Joe Shalabi
            Reporter:
            Joe Shalabi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: