Use compact diff format for updates to arrays using classic $set, $pop, $pull

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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 } ] } } }}

       

              Assignee:
              [DO NOT USE] Backlog - Query Execution
              Reporter:
              Katya Kamenieva
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated: