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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Query Execution

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

       

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            kateryna.kamenieva@mongodb.com Katya Kamenieva
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated: