[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:
Related
related to SERVER-26185 Remove majority reads from MigrationM... Closed
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:

  1. Node becomes primary and balancer thread is started
  2. Node steps down just before the balancer thread manages to wait for RC majority as part of the balancer dist lock overtake
  3. Node steps down, but balancer thread continues to wait for majority RC

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 "SERVER-26155 Use read concern 'local' for dist lock manager on the config server"

This reverts commit aed4f47200abff44605fc39f078601ebb0c316c7.
Branch: master
https://github.com/mongodb/mongo/commit/5ad451cf32d8b42f9f7ae0ca61dbb7dff94c875d

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: SERVER-26155 Use read concern 'local' for dist lock manager on the config server
Branch: master
https://github.com/mongodb/mongo/commit/aed4f47200abff44605fc39f078601ebb0c316c7

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.

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