Implement scan for documents that don't compy with the collection validator

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2026-05-11, QE 2026-04-27
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This will be done by the coordinating shard fetching the collection validator from it’s collection catalog. The coordinator will then preform a simple aggregation command with limit:1 to find an invalid document. db.products.aggregate([ { $match: {$nor: [

      { $jsonSchema: <collection validator> }

      ] }, {$limit: 1} ], {hint: {$natural: 1}}). $natural is needed to force a collection scan to prevent an index scan skipping documents.

            Assignee:
            Mickey Winters
            Reporter:
            Mickey Winters
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: