[SERVER-15779] replica set drain mode does not cancel properly Created: 22/Oct/14  Updated: 19/Nov/14  Resolved: 28/Oct/14

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

 m31000| 2014-10-21T20:47:43.818-0400 I REPLSETS replSet election succeeded, assuming primary role
 m31000| 2014-10-21T20:47:43.818-0400 I REPLSETS transition to PRIMARY
 m31000| 2014-10-21T20:47:43.818-0400 I REPLSETS stepping down build3.nj1.10gen.cc:31000 (priority 1), build3.nj1.10gen.cc:31001 is priority 2 and 0 seconds behind
 m31000| 2014-10-21T20:47:43.818-0400 I REPLSETS Stepping down from primary in response to heartbeat
 m31000| 2014-10-21T20:47:43.818-0400 I REPLSETS [repl0x3304f20] transition to SECONDARY
 m31000| 2014-10-21T20:47:43.819-0400 I NETWORK  [conn1] end connection 127.0.0.1:56777 (1 connection now open)
 m31000| 2014-10-21T20:47:44.273-0400 I REPLSETS [rsSync] transition to primary complete; database writes are now permitted



 Comments   
Comment by Githook User [ 28/Oct/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-15779 Clear drain mode flag when switching out of primary state.

Also, maintain the global lock held in multiApply while calling applyOpsToOplog.
Putting applyOpsToOplog outsite that critical section allows a race in which a
node might exit drain mode due to step-down and then be reelected primary, leading
to risky behavior.
Branch: master
https://github.com/mongodb/mongo/commit/17917954b999b689cac37695e2885b2d35be9014

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