-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
ALL
-
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
This is very similar to SERVER-102825, but I discussed with ben.shteinfeld@mongodb.com and we decided to file a new ticket since the root cause seems different. The issue from SERVER-102825 was fixed and the bug doesn't repro anymore.
In SERVER-102825, the partial index filter and query have an $or, but the resulting plan was just a single index scan + fetch, not the union of two index scans.
In this repro, the partial index filter and query also have an $or, but there is an index union. One subplan uses the _id index and the other subplan uses the "a" index with the partial filter. Then when a query with the same shape but different constants that don't satisfy the partial filter is run, we use the cache entry anyway.
- related to
-
SERVER-102825 Queries using partial indexes with $or filter can return incorrect results when cache entry exists
-
- Closed
-