-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
v5.0
-
Query Execution 2021-05-31, Query Execution 2021-06-14
-
137
filterObj = {}; for (let i = 0; i < 225; ++i) { filterObj["foo" + i] = 123; } db.coll.runCommand({explain: {find: "coll", filter: filterObj}})
This was enough to trigger it on an optimized build on my machine. An unoptimized build will likely fair worse.
The implicit ANDs in the filter are translated in a way which makes each clause of the AND a child of the previous one (instead of a sibling). This is known as the "top level AND optimization." With such a deep tree, when each stack frame is large, it is quite easy to overflow.
- is related to
-
SERVER-57291 Investigate stack overflow in SBE plans
- Closed