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

$group does not fail with QueryExceededMemoryLimit error when SBE $group pushdown turned on and it runs as sub-pipeline of $unionWith

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • QE 2021-10-04

      buildscripts/resmoke.py run --suites=aggregation --mongodSetParameters="{internalQueryEnableSlotBasedExecutionEngine: true}" --additionalFeatureFlags=featureFlagTimeseriesCollection,featureFlagSbePlanCache,featureFlagSBEGroupPushdown jstests/aggregation/sources/unionWith/unionWith.js
      

      The failed test case:

      // Test that a $group within a $unionWith sub-pipeline correctly fails if it needs to spill but
      // 'allowDiskUse' is false.
      assert.commandFailedWithCode(testDB.runCommand({
          aggregate: collA.getName(),
          pipeline: [
              {
                  $unionWith: {
                      coll: collB.getName(),
                      pipeline: [
                          {"$group": {_id: "$groupKey", val: {$sum: "$val"}}},
                          {"$addFields": {groupKey: 1}}
                      ]
                  }
              },
          ],
          allowDiskUse: false,
          cursor: {}
      }),
                                   ErrorCodes.QueryExceededMemoryLimitNoDiskUseAllowed);
      

            Assignee:
            yoonsoo.kim@mongodb.com Yoon Soo Kim (Inactive)
            Reporter:
            yoonsoo.kim@mongodb.com Yoon Soo Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: