tomstepp commented on code in PR #36685:
URL: https://github.com/apache/beam/pull/36685#discussion_r2482187714


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedReader.java:
##########
@@ -621,11 +624,18 @@ private void commitCheckpointMark() {
                     Collectors.toMap(
                         p -> new TopicPartition(p.getTopic(), 
p.getPartition()),
                         p -> new OffsetAndMetadata(p.getNextOffset()))));
+        nextAllowedCommitFailLogTime = now.plus(MIN_COMMIT_FAIL_LOG_INTERVAL);
       } catch (Exception e) {
         // Log but ignore the exception. Committing consumer offsets to Kafka 
is not critical for
         // KafkaIO because it relies on the offsets stored in 
KafkaCheckpointMark.
-        LOG.warn(
-            String.format("%s: Could not commit finalized checkpoint %s", 
this, checkpointMark), e);
+        if (now.isAfter(nextAllowedCommitFailLogTime)) {
+          LOG.warn(
+              String.format(
+                  "%s: Did not successfully commit finalized checkpoint for > 
%s: %s",
+                  this, MIN_COMMIT_FAIL_LOG_INTERVAL, checkpointMark),
+              e);
+          nextAllowedCommitFailLogTime = 
now.plus(MIN_COMMIT_FAIL_LOG_INTERVAL);
+        }

Review Comment:
   Updated with info log with note about future attempts.



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