ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 9.1.0-rc0, 9.0.4
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • ALL
    • v9.0
    • QE 2026-07-20
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

        1. Problem

      The checkMetadataConsistency command runs an internal aggregation containing a $group that does not set allowDiskUse. When internalDocumentSourceGroupMaxMemoryBytes is lowered process-wide (via setParameter), that $group exceeds its in-memory limit and fails with QueryExceededMemoryLimitNoDiskUseAllowed (code 292):

      Failed to execute aggregation for: Check collection metadata consistency across shards
        :: caused by :: Exceeded memory limit for $group, but didn't allow external spilling;
        pass allowDiskUse:true to opt in
      

      This surfaces via the CheckMetadataConsistencyInBackground hook when a query knob PBT sets the knob to a small value on all non-config nodes. Two tests lower this knob process-wide:

      • jstests/core/query/query_settings/query_settings_knob_validation_pbt.js
      • jstests/core/query/query_knob_correctness_pbt.js

      It is the same class of failure already worked around for unionWith.js and release_memory/group.js.

        1. Fix

      Add both PBTs to the CheckMetadataConsistencyInBackground.SKIP_TESTS list so the background check is disabled while they run, and re-include internalDocumentSourceGroupMaxMemoryBytes in the validation-parity PBT's knob coverage.

      Fixes BF-44650 (and the related CheckMetadataConsistencyInBackground failures seen in BF-44347).

            Assignee:
            Catalin Sumanaru
            Reporter:
            Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: