Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
3.5.0
-
None
-
WIndows 10, Java 1.8
-
Fully Compatible
Description
Unable to exit from hasNext() for tailable cursor if cursor was closed from another thread
My proposal is to add another check for "closed" inside
while (serverCursor != null) { |
getMore();
|
if (nextBatch != null) { |
return true; |
}
|
}
|
before getMore(). So if cursor was closed from another thread, hasNext() will exit. But this should be done in thread-safe way.
Attachments
Issue Links
- is depended on by
-
DRIVERS-421 Cursor iteration should complete (abnormally) when another thread closes the cursor
-
- Closed
-
- related to
-
SERVER-21710 Allow pinned ClientCursors to be killed on mongod
-
- Closed
-