Use compact diff format for updates to arrays using classic $addToSet operator

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • QE 2023-05-15, QE 2023-05-29, QE 2023-06-12, QE 2023-06-26, QE 2023-07-10, QE 2023-07-24, QE 2023-08-07, QE 2023-08-21
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When we use $addToSet to add an element to the array, the entire new array is recorded in the oplog. This leads to large change stream events.

      Today $addToSet does not guarantee a particular ordering of elements in the modified set, so it could be modified to always add the element to the end of the array, similar to $push, and produce message like { 'arrayField.100': 'value'  }

              Assignee:
              Mickey Winters
              Reporter:
              Katya Kamenieva
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: