[SERVER-71269] Use compact diff format for updates to arrays using classic $set, $pop, $pull Created: 10/Nov/22 Updated: 06/Oct/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Katya Kamenieva | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | ians-backlog | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
When using classic update language with operators $set, $pop, $pull to add/remove an element from the array, it writes down the new value of the array to the oplog, and leads to large change stream events. Instead we could use compact diff so that the resulting change stream event would include: { updateDescription: { updatedFields: { 'arrayField.3': 4 }, ... }} or {{{ updateDescription: {..., truncatedArrays: [ { field: 'arrayField', newSize: 3 } ] } } }}
|
| Comments |
| Comment by Katya Kamenieva [ 17/Jan/23 ] |
|
I filed a separate ticket for $addToSet |