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

When applying applyOps commands during initialSync, do not override alwaysUpsert flag

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • ALL
    • Repl 2018-01-15, Repl 2019-10-07, Repl 2019-10-21, Repl 2019-12-16

      Right now if we have an applyOps command with an 'alwaysUpsert: false' field, it will be applied with 'alwaysUpsert: false' both during steady state replication and in initial sync. This has the same idempotency problem as applying ordinary updates during initial sync, which is that the updated document may not be there because it might have been deleted on the sync source after the oplog entry. So we should ignore the applyOps alwaysUpsert field during initial sync.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: