[JAVA-467] Calling setReadPreference(ReadPreference.SECONDARY) is not reading from secondary servers Created: 07/Nov/11 Updated: 01/May/14 Resolved: 19/Nov/11 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Cluster Management |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jason Nethercott | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
In a test environment with 4 MongoDB instances, all the reads in the attached test code are executed against only the master server. This is identified by the watching the console of each of the instances, and the CPU of the machines on which the instances are running. The call the DBCursor.getServerAddress() is not working either, it only returns a null, so that we cannot verify where the reads are being executed. (Not sure if this is related.) |
| Comments |
| Comment by auto [ 12/Dec/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by auto [ 12/Dec/11 ] |
|
Author: {u'login': u'bwmcadams', u'name': u'Brendan W. McAdams', u'email': u'brendan@10gen.com'}Message: Tests utterly fail with this commit; as a result, rolling back. Revert " This reverts commit 9ae9483639d064a41f873b4063582c7b782000b8. |
| Comment by auto [ 22/Nov/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Ryan Nitz [ 08/Nov/11 ] |
|
Hi Jason, Thanks for bringing this to our attention (and sorry about the headaches). I attached a patched library. Can you run in your environment and confirm everything is working properly? Thanks, -Ryan |
| Comment by auto [ 08/Nov/11 ] |
|
Author: {u'login': u'rgnitz', u'name': u'Ryan', u'email': u'rgnitz@gmail.com'}Message: added _check call to getServerAddress if _it is null - |
| Comment by auto [ 08/Nov/11 ] |
|
Author: {u'login': u'rgnitz', u'name': u'Ryan', u'email': u'rgnitz@gmail.com'}Message: Moved variable calls to method to fix read preference hierarchy - |
| Comment by Jason Nethercott [ 07/Nov/11 ] |
|
Affected version is 2.7.0, however, it's not listed in JIRA. |