[JAVA-570] distinct and count not go to secondary even we have specified the ReadPreference Created: 21/May/12 Updated: 29/Aug/12 Resolved: 02/Jul/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.7.2 |
| Fix Version/s: | 2.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Xiaofeng Wu | Assignee: | Steve Briskin (Inactive) |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
count/distict implementation of DBCollection do not take ReadPreference, so eventually it goes to Primary instead of Secondary even we have specified secondary preference. Here's the code caused this problem: BasicDBObject cmd = new BasicDBObject(); if ( limit > 0 ) CommandResult res = _db.command(cmd,getOptions()); Here's when calling "_db.command(cmd,getOptions())" but not passing read preference, it works when I changed it to: same issue for "distinct" |
| Comments |
| Comment by Jeffrey Yemin [ 29/Aug/12 ] | ||||||||||||||||||||||||||||
|
Closing as part of 2.9.0 release process. | ||||||||||||||||||||||||||||
| Comment by auto [ 10/Jul/12 ] | ||||||||||||||||||||||||||||
|
Author: {u'date': u'2012-06-25T07:49:44-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}Message: merge with branch | ||||||||||||||||||||||||||||
| Comment by auto [ 10/Jul/12 ] | ||||||||||||||||||||||||||||
|
Author: {u'date': u'2012-06-19T11:56:06-07:00', u'email': u'steve.briskin@10gen.com', u'name': u'Steve Briskin'}Message: | ||||||||||||||||||||||||||||
| Comment by auto [ 25/Jun/12 ] | ||||||||||||||||||||||||||||
|
Author: {u'date': u'2012-06-25T07:49:44-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}Message: merge with branch | ||||||||||||||||||||||||||||
| Comment by auto [ 25/Jun/12 ] | ||||||||||||||||||||||||||||
|
Author: {u'date': u'2012-06-19T11:56:06-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}Message: | ||||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 21/May/12 ] | ||||||||||||||||||||||||||||
|
Please use slaveOk (even though it's deprecated) until we get this fixed. | ||||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 21/May/12 ] | ||||||||||||||||||||||||||||
|
This is related to
|