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.
- related to
-
SERVER-14322 Retry on predicate unique index violations of update + upsert -> insert when possible
- Closed