SERVER-138185Needs Scheduling

Mark collection validator type info as used only if it made an actual difference for type inference

For example, suppose we have a schema constraint that says "a.b" is not an array, but there is also an index on "a.b" that gives us the same information. When the schema constraint is modified in some way, we shouldn't have to kill queries that relied on 'a.b' not being an array because the same fact can be obtained from index metadata.   This would probably involve exposing some API to the dependency graph from expCtx  or SchemaTypeInfo that allows the graph to mark SchemaTypeInfo as used

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.