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-unsubscr...@kafka.apache.org

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

Reply via email to