[SERVER-21432] Allow slaveOk reads while in drain mode Created: 12/Nov/15  Updated: 25/Jan/17  Resolved: 17/Jun/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.2.12, 3.3.9

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

Issue Links:
Backports
Related
related to SERVER-21375 Confusing error message when command ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.2
Sprint: Repl 15 (06/03/16), Repl 16 (06/24/16), Repl 2016-10-31
Participants:

 Description   

Nodes in drain mode with slaveOk specified should be able to accept reads. Currently, you get a "node is recovering" error instead. The logic in Command::execCommand() needs to be tightened up when detecting nodes actually in RECOVERING state versus PRIMARY but can't do writes (otherwise known as 'drain mode').



 Comments   
Comment by Githook User [ 19/Jan/17 ]

Author:

{u'username': u'dragoncsc', u'name': u'hari devaraj', u'email': u'hari.devaraj@10gen.com'}

Message: SERVER-21432 Allowed slaveOk reads when node is in drain mode

(cherry picked from commit dd7e05dbde9f1e9554ad93cada8fb4d5dcbe11de)
Branch: v3.2
https://github.com/mongodb/mongo/commit/12ae6869bef461d9604d667df726825bcaa35e32

Comment by Githook User [ 17/Jun/16 ]

Author:

{u'name': u'hari devaraj', u'email': u'hari.devaraj@10gen.com'}

Message: SERVER-21432 Allowed slaveOk reads when node is in drain mode
Branch: master
https://github.com/mongodb/mongo/commit/dd7e05dbde9f1e9554ad93cada8fb4d5dcbe11de

Comment by Eric Milkie [ 07/Jun/16 ]

Sorry if the solution wasn't clear – we should permit slaveOk reads while in drain mode. I can't think of a reason to prohibit them.

Comment by Siyuan Zhou [ 07/Jun/16 ]

milkie, would you like to enable slaveOk read while in drain mode or make the error messages better as in SERVER-21375?

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