Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
ChangeStreamBatchCursor is currently swallowing MongoInterruptedException as a retryable error, making threads which are blocked watching a change stream uninterruptible.
Minimal reproduction which hangs forever:
final Thread t = |
new Thread( |
() -> {
|
try { |
for (final ChangeStreamDocument<Document> doc : collection.watch()) { |
System.out.println(doc);
|
}
|
} catch (final MongoInterruptedException e) { |
System.out.println("interrupted"); |
}
|
});
|
|
|
t.start();
|
|
|
Thread.sleep(1000); |
|
|
t.interrupt();
|
t.join();
|
Attachments
Issue Links
- duplicates
-
JAVA-3290 Change streams resume after thread is interrupted
-
- Closed
-