You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "rohits64 (via GitHub)" <gi...@apache.org> on 2023/05/02 04:42:18 UTC

[GitHub] [kafka] rohits64 commented on a diff in pull request #13361: KAFKA-14401: Fail the worker if any uncaught exception comes in WorkThread

rohits64 commented on code in PR #13361:
URL: https://github.com/apache/kafka/pull/13361#discussion_r1182075901


##########
connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaOffsetBackingStore.java:
##########
@@ -316,6 +316,9 @@ public Map<ByteBuffer, ByteBuffer> convert(Void result) {
         // if we've already read up to the end. However, it also should not be common (offsets should only be read when
         // resetting a task). Always requiring that we read to the end is simpler than trying to differentiate when it
         // is safe not to (which should only be if we *know* we've maintained ownership since the last write).
+        if (offsetLog.unexpectedExceptionCaught.get()) {
+            throw new ConnectException("Unexpected Exception caught", offsetLog.exception);
+        }

Review Comment:
   Connect Exception can be thrown inside the readToEnd method, we need to handle it at all place where it is called, instead of just in KafkaOffsetBackingStore. It would be better approach as it would handle all cases of this bug.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org