-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Query Execution 2021-06-14, Query Execution 2021-06-28, Query Execution 2021-07-12, Query Execution 2021-07-26, QE 2021-08-09
As discussed in SERVER-57225, SBE plans with large top-level ANDs may result in a stack overflow. While fixing this particular scenario is straightforward, there may be other queries which cause stack overflow in SBE that we have not discovered yet.
We should spend some time investigating whether any such queries exist, and if so, build a more generic mechanism for tracking SBE tree depth during plan construction. If the plan exceeds some fixed depth, we'd have to bail out and either use the classic engine (or, eventually fail the query).
A few ideas for queries which may be able to trigger this:
-A query with a filter or projection on a very long path (a.b.c.d.e.f...)
-A query with many nested $and and $ors
-A query with a $slice or positional projection on a very long path
- related to
-
SERVER-57225 SBE plans may trigger stack overflow
- Closed