[SERVER-26155] DistLockManager on config server should not do 'majority' reads Created: 18/Sep/16 Updated: 20/Sep/16 Resolved: 20/Sep/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.3.12 |
| Fix Version/s: | None |
| Type: | Bug | 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: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Sharding 2016-10-10 | ||||||||
| Participants: | |||||||||
| Description |
|
The dist lock manager used on the config server does read concern 'majority' reads against the instance on which it is running. While this is not a correctness problem, it may cause deadlock when used from internal threads, because locally done reads do not obey the operation deadline when waiting for RC majority and also because internal threads are not interrupted on step down. This is evidenced by a deadlock on balancer shutdown with the following order of events:
Left in the state above, that node cannot become primary again, without ever becoming secondary, because the balancer thread is stuck. |
| Comments |
| Comment by Githook User [ 20/Sep/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: Revert " This reverts commit aed4f47200abff44605fc39f078601ebb0c316c7. |
| Comment by Githook User [ 19/Sep/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |
| Comment by Kaloian Manassiev [ 18/Sep/16 ] |
|
Since all reads performed by the local dist lock catalog are always on the primary node and are followed up by a majority write, a proposed solution is to make these reads always use a local write concern. |