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

$group queries stored in SBE plan cache should encode 'needsMerge' into plan cache key

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 7.0.0-rc0, 6.3.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • v6.3
    • QE 2023-03-06, QE 2023-03-20, QE 2023-04-03
    • 168

      This bug was exposed when dateToString was implemented in SBE.
      jstests/sharding/query/merge_use_cases.js began failing on the last assertion with the message:

      2788 uncaught exception: Error: [{
      2789         "_id" : "2018-08-15T06",
      2790         "ticks" : [
      2791                 1,
      2792                 550,
      2793                 0
      2794         ],
      2795         "avgTemp" : {
      2796                 "count" : NumberLong(10),
      2797                 "ps" : [
      2798                         1,
      2799                         403,
      2800                         0
      2801                 ]
      2802         }
      2803 }] != [{ "_id" : "2018-08-15T06", "ticks" : 550, "avgTemp" : 40.3 }] are not equal 
      

      The bug occurs whether featureFlagSbeFull is on or not. However, it does not occur when forceClassicEngine is on. I suspect it's a bug that is now exposed by the entire prefix of the pipeline being supported in SBE and therefore eligible for pushdown.

      I've commented out the failing line for now, until this can be further investigated.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            jennifer.peshansky@mongodb.com Jennifer Peshansky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: