[JAVA-2858] ChangeStream cursor raises a MongoSocketReadException when there is no event since last replica set election Created: 10/May/18 Updated: 28/Oct/23 Resolved: 14/May/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Query Operations |
| Affects Version/s: | 3.6.0 |
| Fix Version/s: | 3.6.4, 3.7.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Wan Bachtiar | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
openjdk version "1.8.0_151" |
||
| Issue Links: |
|
||||||||
| Description |
|
While testing the fix in For example:
Example code:
The stack trace:
|
| Comments |
| Comment by Wan Bachtiar [ 12/Jun/18 ] | ||||||||||||||||
|
jeff.yemin, FWIW, just tested with v3.7.1 and able to confirm that it's working as expected now. | ||||||||||||||||
| Comment by Githook User [ 18/May/18 ] | ||||||||||||||||
|
Author: {'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}Message: This commit ensures that change streams are resumable even when watching | ||||||||||||||||
| Comment by Jeffrey Yemin [ 14/May/18 ] | ||||||||||||||||
|
wan.bachtiar thanks again for the report. If you're willing to check the fix against your reproducer that would be much appreciated. | ||||||||||||||||
| Comment by Githook User [ 14/May/18 ] | ||||||||||||||||
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}Message: This commit ensures that change streams are resumable even when watching | ||||||||||||||||
| Comment by Githook User [ 14/May/18 ] | ||||||||||||||||
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}Message: This commit ensures that change streams are resumable even when watching | ||||||||||||||||
| Comment by Jeffrey Yemin [ 10/May/18 ] | ||||||||||||||||
|
What's happening is probably this:
One way to fix this is to loop in resumableOperation:
Same thing in the async version, though the code will be very different. |