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

Streaming $group does not handle nullish values correctly.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Operating System:
      ALL
    • Sprint:
      Query 12 (04/04/16), Query 13 (04/22/16)

      Description

      SERVER-4507 was implemented and pushed, but has a known issue:

      Because of how the index sorts null, missing, and undefined values, a user executing a $group on documents with null/missing/undefined values may get the incorrect number of groups.

      To fix this, $group should not stream for the period that input has nullish _id values.

      Once this change has gone into master, DocumentSourceGroup::findRelevantInputSort should be changed to not immediately return boost::none, and the associated tests in document_source_test.cpp should be reenabled by removing the #if surrounding the lines that add the tests to the suite.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              david.storch David Storch
              Reporter:
              benjamin.murphy Benjamin Murphy
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: