gharris1727 commented on code in PR #13178:
URL: https://github.com/apache/kafka/pull/13178#discussion_r1105015802


##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/OffsetSyncStore.java:
##########
@@ -76,26 +112,26 @@ OptionalLong translateDownstream(TopicPartition 
sourceTopicPartition, long upstr
     }
 
     // poll and handle records
-    synchronized void update(Duration pollTimeout) {
+    synchronized void update(Duration pollTimeout) throws TimeoutException {
         try {
-            consumer.poll(pollTimeout).forEach(this::handleRecord);
-        } catch (WakeupException e) {
+            backingStore.readToEnd().get(pollTimeout.toMillis(), 
TimeUnit.MILLISECONDS);
+        } catch (WakeupException | InterruptedException | ExecutionException 
e) {
             // swallow

Review Comment:
   This is much cleaner, as it puts the responsibility for balking on the 
OffsetSyncStore, rather than sharing the responsibility with the 
CheckpointTask. Thanks for the suggestion!



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