[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: |
|
||||||||||||
| 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: (cherry picked from commit dd7e05dbde9f1e9554ad93cada8fb4d5dcbe11de) |
| Comment by Githook User [ 17/Jun/16 ] |
|
Author: {u'name': u'hari devaraj', u'email': u'hari.devaraj@10gen.com'}Message: |
| 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 |