-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When a query is eligible for distinct scan, we try planning and if there are no distinct scan plans, we throw an exception and retry planning with distinctEligible=false. However, when we try planning again, we don't check if another exception is thrown. This planning call could throw any of these exceptions: NoQueryExecutionPlans, RetryMultiPlanning, ReplanningRequired
Since these exceptions aren't caught, the query fails and the exception is returned to the user. The expected behavior is for the query to retry planning again and eventually succeed.
The fix is to retry planning with the same try/catch that we use in the first attempt. Notice in this try/catch sequence, the other "catch" blocks do not return. Instead they reset plannerParams and allow the outer loop to retry planning under the same try/catch. Distinct incorrectly retries planning immediately.
- is related to
-
SERVER-93694 Address SBE incompatibility for distinct-like queries in distinct multiplanning
-
- Closed
-