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

Make single-update write conflict path same as multi-update

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.8.0-rc0
    • 3.0.0-rc9, 3.1.0
    • Concurrency, Sharding
    • None
    • Fully Compatible

    Description

      The introduction of WriteConflictExceptions adds another lock-reacquistion path for certain storage engines. Because sharding and replication code need to recheck invariants on most lock reacquisition, this increases the number of places that need to be audited for correct behavior on reacquiring the lock. WriteConflictExceptions also break the executor model, in that successfully running an update/delete query now requires a retry loop which is easy to forget.

      Some sort of encapsulation of the invariants that need to be checked every time locks are reacquired would make it possible to generically run an executor with retry whether the lock reacquisition was due to old-style yielding or new-style WriteConflictException retries.

      Attachments

        Issue Links

          Activity

            People

              eliot Eliot Horowitz (Inactive)
              greg_10gen Greg Studer
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: