[SERVER-19694] Distributed lock should retry on duplicate key error creating the lock entry Created: 31/Jul/15  Updated: 25/Jan/17  Resolved: 10/Aug/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.1.7

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-14322 Retry on predicate unique index viola... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 7 08/10/15, Sharding 8 08/28/15
Participants:
Linked BF Score: 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.



 Comments   
Comment by Githook User [ 10/Aug/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-19694 Distributed lock should retry on duplicate key error creating the lock entry
Branch: master
https://github.com/mongodb/mongo/commit/ef17792e8a168917da0d009ff9faeba59552fae6

Comment by Githook User [ 04/Aug/15 ]

Author:

{u'username': u'kkmongo', u'name': u'Kamran Khan', u'email': u'kamran.khan@mongodb.com'}

Message: SERVER-19694 Disable mapReduce FSM workload that triggers dupe key exception

The workload will be re-enabled when the underlying server bug is fixed.
Branch: master
https://github.com/mongodb/mongo/commit/3041da9fc2127a3193a769c2a708261700e690bb

Generated at Thu Feb 08 03:51:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.