Given an index with a partial filter containing a $or and one branch being {<path>: {$exists: true}}. If a plan cache entry gets created (and is active) for a parameterized query such as {<path>: {$eq: 5}}, then a subsequent query of the form {<path>: {$eq: null}} will incorrectly use the cached plan even though $eq with null does not satisfy the $exists filter since it also matches missing. The $or is significant as I was not able to reproduce this with a single $exists partial index filter.
Attached is a minimal repro script. Note that I verified this happens on 6.0 and master, but not on 5.0.
- is duplicated by
-
SERVER-71489 tassert tripped when using a cached ixscan plan involving a partialFilterExpression with $or and non-simple collation
- Closed
-
SERVER-72753 Incorrect usage of plan cache entry for IXSCAN over partial filter index containing $and
- Closed
- is related to
-
SERVER-71489 tassert tripped when using a cached ixscan plan involving a partialFilterExpression with $or and non-simple collation
- Closed
-
SERVER-74207 Add partial_index_logical.js to backports_required_for_multiversion_test.yml blacklist
- Closed