[SERVER-20708] getMore and killCursors commands should ignore the value of the slaveOk bit received from the client Created: 30/Sep/15 Updated: 17/Mar/16 Resolved: 07/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| 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 | ||||||||||||||||||||
| Sprint: | QuInt A (10/12/15) | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Currently, the server will fail these commands if an internal or external client attempts to execute them on a secondary node without the slaveOk bit set. |
| Comments |
| Comment by Jeffrey Yemin [ 07/Oct/15 ] |
|
david.storch some drivers have already pushed code to master with special handling of slaveOk for getMore and killCursors. That code can be ripped out due to this change. |
| Comment by David Storch [ 07/Oct/15 ] |
|
jeff.yemin, should this really be "Drivers Changes: Needed"? This should make getMore and killCursors commands match the behavior of OP_GET_MORE and OP_KILLCURSORS, so I don't think drivers necessarily need to do anything. |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: These commands will now succeed on secondaries even if slaveOk=0. |
| Comment by David Storch [ 01/Oct/15 ] |
|
OP_GET_MORE does not include a slaveOk bit, so the server has no slaveOk value to respect. This means that if a cursor is established on a primary (without slaveOk), a stepdown occurs, and a client issues an OP_GET_MORE against the cursor on the now-secondary node, the operation will not fail. Our thinking is that both OP_GET_MORE and getMore command should respect the original slaveOk value sent with the find operation in this case rather than associating a new slaveOk bit with each getMore. schwerin, do you agree? |
| Comment by Andy Schwerin [ 01/Oct/15 ] |
|
Remind me, what's the behavior of OP_GETMORE? |