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

Investigate stack overflow in SBE plans

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0-rc0
    • Component/s: None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query Execution 2021-06-14, Query Execution 2021-06-28, Query Execution 2021-07-12, Query Execution 2021-07-26, QE 2021-08-09

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jennifer.peshansky Jennifer Peshansky
              Reporter:
              ian.boros Ian Boros
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: