-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: Logging
-
None
-
None
-
Java Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Exceptions thrown inside CompletionHandler implementations inÂ
AsynchronousChannelStream can escape up to the executor’s Future returned by submit() in AsynchronousTlsChannelGroup.java#L227-L229 , where they are silently ignored.
This means if an unexpected exception happens, for example after the user callback was already called, or due to some internal driver bugs, it neither propagates to the callback nor triggers Thread's UncaughtExceptionHandler, nor logs anything.
Adding defensive try/catch with explicit assertion logging ensures these errors appear in logs, avoiding silent failures that make debugging and identification of such issues hard. It improves observability and simplifies troubleshooting for users and us.
This is similar to ErrorHandlingCallback.
Acceptance criteria:
- Root completion handlers (WriteCompletionHandler, BasicCompletionHandler, etc.) wrap their logic in try/catch blocks.
- Any uncaught exception is logged once at ERROR level as an assertion failure.