Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57291

Investigate stack overflow in SBE plans

    • 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

            Assignee:
            jennifer.peshansky@mongodb.com Jennifer Peshansky (Inactive)
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: