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

Disable SBE for very large queries in v6.0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.17
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL

      Here is an example a large $group query that causes stack overflow (tested on v6.0 opt build, statically linked): stack-overflow-example-group-query.txt.

      Prior to SPM-2697 (which shipped as part of v7.0), for queries containing hundreds of expressions, the SBE stage builder was prone to generate very deep SBE plan trees in some scenarios. For $group specifically, it's pretty easy to get the SBE stage builder to generate very deep SBE plan trees which will stack overflow during execution (as shown in stack-overflow-example-group-query.txt).

      The goal of this task is to implement a solution to this problem so that these kinds of queries won't crash on v6.0. If v5.0 is affected by this issue, we may also need to backport the fix to v5.0 as well.

            Assignee:
            andrew.paroski@mongodb.com Drew Paroski
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: