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

Distributed lock should retry on duplicate key error creating the lock entry

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.7
    • None
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 7 08/10/15, Sharding 8 08/28/15
    • 0

    Description

      If two threads/processes both try to create a distributed lock on a new entity at the same time (for instance if they are both trying to create the same new database), then due to SERVER-14322, one of them might get a duplicate key error creating the entry in the config.locks collection. When we get that, currently we abandon trying to get the lock, even if we have more time left in our retry interval. We should be able to retry lock acquisition in this case, which is likely to succeed so long as the other process which was able to successfully create the config.locks entry releases the lock quickly.

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: