[JAVA-2821] Change stream cursor does not resume when attempt to kill the existing cursor fails Created: 23/Mar/18  Updated: 28/Oct/23  Resolved: 26/Mar/18

Status: Closed
Project: Java Driver
Component/s: Query Operations
Affects Version/s: 3.6.0
Fix Version/s: 3.6.4, 3.7.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

The change stream specification test plan says:

The killCursors command sent during the “Resume Process” must not be allowed to throw an exception

This was not properly implemented in the driver. In particular, if the attempt to get a connection on which to send the killCursors commands results in a ConnectException, then that exception will be thrown instead of being suppressed. As a result, if the attempt to kill the cursor fails (as when the server with the cursor is shut down) then the driver will not properly resume the change stream cursor and instead throw the exception.



 Comments   
Comment by Githook User [ 26/Mar/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin', 'username': 'jyemin'}

Message: JAVA-2821: When killing a cursor, exceptions are supposed to be suppressed. The suppression now includes the attempt to get a connection on which to kill the cursor, which may also fail (e.g. if the server has been killed)
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/d4d9f161412d5fbaba2648bdcb4349cba5c1a0e7

Comment by Githook User [ 26/Mar/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin', 'username': 'jyemin'}

Message: JAVA-2821: When killing a cursor, exceptions are supposed to be suppressed. The suppression now includes the attempt to get a connection on which to kill the cursor, which may also fail (e.g. if the server has been killed)
Branch: 3.6.x
https://github.com/mongodb/mongo-java-driver/commit/431c6e5d66bde0602bbe374c2d3281fad52b1823

Generated at Thu Feb 08 08:58:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.