[JAVA-1921] getStats() helper should respect DBCollection read preference Created: 07/Aug/15 Updated: 14/Sep/15 Resolved: 14/Aug/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Command Operations |
| Affects Version/s: | 3.0.3 |
| Fix Version/s: | 3.0.4, 3.1.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Luke Lovett | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
The getStats() helper on DBCollection always uses the "primary" read preference, regardless of what read preference is set on the underlying collection. According to the server selection spec, the collStats command may use a "secondary" read preference: https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#use-of-read-preferences-with-commands This bug only affects the 3.0 version of the Java driver. |
| Comments |
| Comment by Jeffrey Yemin [ 14/Sep/15 ] |
|
Fix release today in 3.0.4. |
| Comment by Githook User [ 14/Aug/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Changed DBCollection.getStats to use the collection's default read preference, as per the server selection specification. |
| Comment by Githook User [ 14/Aug/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Changed DBCollection.getStats to use the collection's default read preference, as per the server selection specification. |