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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.7
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 7 08/10/15, Sharding 8 08/28/15
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Randolph Tan
            Reporter:
            Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: