-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Schema metadata inferred from collection validators can become stale while a query is executing if a collection’s validator or validation options change during a yield. This change adds CollectionSchemaChecker, which tracks the schema metadata epoch for collection-wide constraints and kills affected plans with QueryPlanKilled when the metadata changes.
The checker is integrated into:
- Classic RequiresCollectionStage restore handling.
- SBE PlanYieldPolicySBE restore handling.
- Plans involving multiple collections.
- Validator, validation-level, and validation-action metadata rebuilds.
Plans only rely on metadata when the validation level is constraint. Relaxing that guarantee also invalidates previously protected plans.