[SERVER-15946] replSetStepDown without force argument will fail if secondaries are behind and there is any write load Created: 04/Nov/14  Updated: 11/Jul/16  Resolved: 20/Nov/14

Status: Closed
Project: Core Server
Component/s: Concurrency, Replication
Affects Version/s: None
Fix Version/s: 2.8.0-rc1

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-1423 reads often aren't possible while in ... Closed
related to SERVER-15861 Add argument to replSetStepDown to al... Closed
Operating System: ALL
Participants:

 Description   

Because the lock manager assigns locks to operations in FIFO order, if a write comes in after replSetStepDown acquires the global lock in MODE_S, but before any secondary has caught up to the head of the oplog, secondaries' attempts to read the oplog will block behind the write's attempt to get the global lock in MODE_IX. Since replSetStepDown took the global lock in MODE_S exactly to block writes, we need some way to indicate to the lock manager that it should continue to grant compatible lock requests, effectively letting reads cut ahead of the blocked writes.



 Comments   
Comment by Githook User [ 20/Nov/14 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-15946 add repro test for replSetStepDown without force argument will fail if secondaries are behind and there is any write load
Branch: master
https://github.com/mongodb/mongo/commit/e8c4f9b33b1b1b8b500e94da331a8eb9e0b9ad05

Comment by Githook User [ 20/Nov/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-15946 Don't acquire MMAPV1Flush lock when locking global shared lock for stepdown.
Branch: master
https://github.com/mongodb/mongo/commit/1b204eba0dc80f4007cb88b995b761a8bc0987fc

Comment by Githook User [ 20/Nov/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-15946 Get rid of GlobalSharedLockAcquirer in favor of taking the global lock directly
Branch: master
https://github.com/mongodb/mongo/commit/2ac3b5b8c79726c73e08bdac732f8f09d846d72f

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