[SERVER-2482] SlaveOK queries and getMores need to go to same member Created: 04/Feb/11 Updated: 12/Jul/16 Resolved: 05/Feb/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.7.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
> var rt = new ReplSetTest( {nodes:7, name:'slave_ok_no_master'}); ) Start up a mongos with rt.getURL() as a shard() and connect > s='x' ) It looks like the works/doesn't work threshold is 32/33 which is the same threshold where a the results won't fit into a single message: > db.foo.find().limit(32).itcount() I added some debugging info into the code and it looks like the getMore is going to the master. |
| Comments |
| Comment by auto [ 05/Feb/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: fix SlaveOk getMore with replica sets for non sharded collections |
| Comment by auto [ 05/Feb/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: fix SlaveOk getMore with replica sets for sharded collections |
| Comment by Mathias Stearn [ 04/Feb/11 ] |
|
Because the wire protocol doesn't require GetMore requests to include the query options, I think the only solution will be modifying strategy_stard to store the query options whenever a cursor is created and examine them when doing a get more. Perhaps just need to keep a set of cursors that were sent to a slave. Note that the C++ driver does send opts in GetMore, but it isn't required, and the python driver (and maybe others) just send zero. |