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

$_internalUnpackBucket can swap with $sort without checking for top-k

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

      Under certain conditions doOptimizeAt in _internalUnpackBucket will swap with a sort without checking if the sort has an internal limit. Since we optimize the pipeline from left to right, this does not cause any issues. However it's possible this could cause a bug in the future where we provide more results to the user than expected by accidentally pushing the limit back.

            Assignee:
            katherine.wu@mongodb.com Katherine Wu (Inactive)
            Reporter:
            matt.boros@mongodb.com Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: