Do not rely on query result order in bucket_unpacking_with_limit.js

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • Storage Execution 2025-03-31
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The aggregate command with pipeline

      pipeline: [
          {
              $match: {
                  $nor: [
                      {"temp": {$in: []}},
                  ]
              }
          },
          {$limit: 5},
          {$sort: {"m.sensorId": 1}},
          {$skip: 2},
          {$limit: 2}
      ]

      performs limit before sort. It cannot assume which documents will be returned eventually then.

              Assignee:
              Yuhong Zhang
              Reporter:
              Yuhong Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: