Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-71269

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

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

      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:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            kateryna.kamenieva@mongodb.com Katya Kamenieva
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: