[JAVA-1944] Getting error when reading from secondary nodes with async driver Created: 31/Aug/15 Updated: 11/Sep/15 Resolved: 10/Sep/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Async |
| Affects Version/s: | 3.0.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jonas Mücke | Assignee: | Ross Lawley |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 14.04, Java 8, Vertx |
||
| Issue Links: |
|
||||||||
| Description |
|
When i use the async driver and connect to a replica set (3 nodes), i get most of the time (66%+) and error: com.mongodb.MongoNotPrimaryException: The server is not the primary and did not execute the operation
If i use the sync driver or change the read preferences to primary everthing works fine. I suppose it is a bug? |
| Comments |
| Comment by Githook User [ 11/Sep/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Use the AsyncReadBinding's readPreference with the ReadConnectionSource
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 11/Sep/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Use the AsyncReadBinding's readPreference with the ReadConnectionSource
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ross Lawley [ 10/Sep/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marking this as a duplicate as the test code in This will be fixed in 3.0.4 & 3.1 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jonas Mücke [ 09/Sep/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Ross, sadly I didn't get time to look into it, but I will try to check it at the end of this week. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ross Lawley [ 09/Sep/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi j_muecke, just chasing this up, did your checking find anything? | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jonas Mücke [ 01/Sep/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for your check. I will try to run your sample code on my machine. Maybe it is a vertx problem. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 31/Aug/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
I tried to reproduce this with the following simplified program:
I ran it three times against a three-server replica set, and changed the port to each of the three members. I didn't get any exceptions. At this point I'm not sure what the difference in between our environments, so we will need to investigate this further. |