-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, we have join eligibility checks to see if any of the fields in the join predicates are multikey and bail out of join if they any are multikey. Thus, even if we cache a plan whose join field later becomes multikey we are currently protected because the join eligibility checks will fail before we even try to retrieve the plan from cache.
However, the non-join fields of a join query, e.g. STPs, may have fields that become multikey that the join plan cache will not be able to detect. We should encode the multikeyness of every single field in the join query into the join plan cache key so that in the event that multikeyness changes on any of the fields, we get a cache miss and do the replanning.
This important because downstream components such as index bounds builders and IXSCAN stage deduplication operates differently based on the multikey state of a field.
- is related to
-
SERVER-134942 Tripwire assertion 3994303 "$expr comparison predicates on multikey paths cannot use an index" index_bounds_builder/index_bounds_builder.cpp:1060 mongo::IndexBoundsBuilder::_translatePredicate
-
- Backlog
-
- related to
-
SERVER-134800 Tripwire assertion Location12926305 Could not find index for INLJ collection reorder_joins.cpp:668:65:auto mongo::join_ordering::fromCachedJoinPlan
-
- Closed
-