-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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
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' }
- is duplicated by
-
SERVER-16484 Optimize $addToSet oplog generation when possible
- Closed
- related to
-
SERVER-71269 Use compact diff format for updates to arrays using classic $set, $pop, $pull
- Backlog