vamossagar12 commented on code in PR #14372:
URL: https://github.com/apache/kafka/pull/14372#discussion_r1670089321


##########
connect/runtime/src/main/java/org/apache/kafka/connect/util/KafkaBasedLog.java:
##########
@@ -614,9 +613,18 @@ public void run() {
                         // See previous comment, both possible causes of this 
wakeup are handled by starting this loop again
                         continue;
                     }
+                } catch (Throwable t) {
+                    log.error("Unexpected exception in {}", this, t);
+                    synchronized (KafkaBasedLog.this) {
+                        // Only fail exactly the number of callbacks we found 
before triggering the read to log end
+                        // since it is possible for another write + readToEnd 
to sneak in the meantime which we don't
+                        // want to fail.

Review Comment:
   test comment



##########
connect/runtime/src/main/java/org/apache/kafka/connect/util/KafkaBasedLog.java:
##########
@@ -614,9 +613,18 @@ public void run() {
                         // See previous comment, both possible causes of this 
wakeup are handled by starting this loop again
                         continue;
                     }
+                } catch (Throwable t) {
+                    log.error("Unexpected exception in {}", this, t);
+                    synchronized (KafkaBasedLog.this) {
+                        // Only fail exactly the number of callbacks we found 
before triggering the read to log end
+                        // since it is possible for another write + readToEnd 
to sneak in the meantime which we don't
+                        // want to fail.

Review Comment:
   test comment



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to