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

Enable useful write concern for no-op operations

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication, Write Ops
    • Labels:
      None

      Currently, if a write operation ends up being a no-op for some reason, no op is logged in the oplog. For example, there could be a race between two clients to update the same document to the same value. Whichever client wins the race will end up logging the op in the oplog, and will have an optime to use for waiting for write concern.
      It would be useful if the losing client could also wait for at least that same optime, even though it didn't do the write. Today, write concern would return immediately without waiting, because the optime in the Client is not updated if a write is a no-op.
      One proposal is to update the optime in the Client even on no-op writes. It could use the global lastOptime for this, since it doesn't know exactly which op it raced with.

            Assignee:
            matt.dannenberg Matt Dannenberg
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: