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

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

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


##########
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:
   QQ - what if ConnectException is thrown inside `readToEnd` method instead in next line ? We may not need to access variables from KafkaBasedLog class explicitly.  
   



-- 
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