[SERVER-72941] Use compact diff format for updates to arrays using classic $addToSet operator Created: 17/Jan/23 Updated: 29/Oct/23 Resolved: 11/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Katya Kamenieva | Assignee: | Mickey Winters |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | query-product-scope-1, query-product-urgency-2, query-product-value-1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | 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 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
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' } |
| Comments |
| Comment by Ian Ward [ 11/Aug/23 ] |
|
Amazing! |
| Comment by Katya Kamenieva [ 11/Aug/23 ] |
|
🎉 |
| Comment by Githook User [ 10/Aug/23 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message: |