[SERVER-26013] Add means to the DistLockManager to restore locks during draining mode Created: 07/Sep/16  Updated: 19/Nov/16  Resolved: 08/Sep/16

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

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-25905 In transition to config primary, drop... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2016-09-19
Participants:

 Description   

As part of the balancer state recovery after stepdown we need to be able to re-acquire the collection distributed locks held by the previous balancer session. This must be done while replication is still in draining mode in order to avoid a race condition where a mongos steals them before the recovery manages to run.

Since majority writes are not allowed while in draining mode, this lock re-acquisition must be done with local write concern.

This ticket is to add a method on the DistLockManager, which would allow such mode of lock acquisition.

Furthermore, because the only owner of the locks being restored can be the balancer, which cleans all its locks before recovery begins, this method does not need to do any lock overtaking.



 Comments   
Comment by Githook User [ 15/Sep/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-26013 Remove default arguments from DistLockManager

In addition, restores the default values for merge and split chunk, which
were broken as part of commit c62a0d7c882e99d3b255e26ade7baaa0d18244cb.
Branch: master
https://github.com/mongodb/mongo/commit/9e82c37fe2430940b2184ca3a44eddc6c61f4db0

Comment by Githook User [ 15/Sep/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-26013 Remove 'lockTryInterval' parameter from the DistLockManager
Branch: master
https://github.com/mongodb/mongo/commit/6590602de70550a7fa0a63b138499d08976a3722

Comment by Githook User [ 08/Sep/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-26013 Add a missing library dependency
Branch: master
https://github.com/mongodb/mongo/commit/59b09a401f9df637a7fcf77e34fd1a5125c54bfc

Comment by Githook User [ 08/Sep/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-26013 Add a tryLock method to the dist lock manager
Branch: master
https://github.com/mongodb/mongo/commit/6c2169cc938d4ef1797782be934e6ce7c97fc21a

Comment by Githook User [ 08/Sep/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-26013 Remove ShardingCatalogClient::distLock and cleanup DistLockManager
Branch: master
https://github.com/mongodb/mongo/commit/c62a0d7c882e99d3b255e26ade7baaa0d18244cb

Generated at Thu Feb 08 04:10:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.