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

Reduce work done for $push:{$each: empty array}

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.8.0-rc3
    • Write Ops
    • None
    • Query

    Description

      db.a.update({_id:1}, {$push:{a:{$each:[]}}}, {upsert:1}) //creates a field
      db.a.update({_id:1}, {$push:{a:{$each:[]}}}, {upsert:1}) // produces oplog entry
      db.a.update({_id:1}, {$push:{a:{$each:[2,3]}}})
      db.a.update({_id:1}, {$push:{a:{$each:[]}}}) // no oplog entry

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: