[JAVA-4260] AsyncQueryBatchCursor should not try to kill the server cursor if pinned connection is corrupted Created: 24/Jul/21  Updated: 30/Mar/22

Status: Backlog
Project: Java Driver
Component/s: Connection Management
Affects Version/s: 4.3.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Valentin Kavalenka Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done after JAVA-4259 Fix LB-related bugs in AsyncQueryBatc... Backlog
Issue split
split from JAVA-4183 Calling cursor.next() and cursor.clos... Closed

 Description   

When working in LB mode, both QueryBatchCursor and AsyncQueryBatchCursor pin a connection and use it for both issuing getMore and killCursors command. If a network error happens while doing getMore, the driver closes the Stream underlying the pinned connection and the connection cannot be used anymore. Thus, the QueryBatchCursor/AsyncQueryBatchCursor should not even try using it. QueryBatchCursor was changed to behave as described when the LB support was implemented, but AsyncQueryBatchCursor was not.

Note that it may be tempting to release the pinned connection and the connection source when a network error happens, but there is a specification test cursors.json: "pinned connections are not returned after an network error during getMore" that unfortunately prevents exactly this. Hopefully it will be gone in the future as a result of DRIVERS-1847.


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