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

Fix out of order array element updates for operators like $min

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 4.4.4
    • None
    • None
    • ALL
    • Query Optimization 2021-05-31

    Description

      This issue was fixed on master by SERVER-50778. In 4.4 and order versions, the array updates were done lexicographically on the index keys. So an array value at index 10 would have been updated ahead of say index 3. If there was an array no value at index 10, we would have create array entries with 'null' values upto index 9. Because of the missing field semantics, we would just update the value in $min for index 10. When we try to update index 3 next, there will be a 'null' value. Since the 'null' value is considered less than any other BSON element, we would not update the value for index 3. If the update system had started with index 3 instead, we would have updated both index value 3 and 10.

      Attachments

        Activity

          People

            james.wahlin@mongodb.com James Wahlin
            arun.banala@mongodb.com Arun Banala
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: