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

Investigate stack overflow in SBE plans

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.1.0-rc0
    • 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

    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

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

              Dates

                Created:
                Updated:
                Resolved: