You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/30 02:56:51 UTC

[GitHub] [kafka] C0urante commented on a change in pull request #10396: KAFKA-12474: Handle failure to write new session keys gracefully

C0urante commented on a change in pull request #10396:
URL: https://github.com/apache/kafka/pull/10396#discussion_r603744554



##########
File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
##########
@@ -363,10 +363,16 @@ public void tick() {
         if (checkForKeyRotation(now)) {
             log.debug("Distributing new session key");
             keyExpiration = Long.MAX_VALUE;
-            configBackingStore.putSessionKey(new SessionKey(
-                keyGenerator.generateKey(),
-                now
-            ));
+            try {
+                configBackingStore.putSessionKey(new SessionKey(
+                    keyGenerator.generateKey(),
+                    now
+                ));
+            } catch (Exception e) {
+                log.warn("Failed to write new session key to config topic; forcing a read to the end of the config topic before possibly retrying");

Review comment:
       Good point; considering the other `WARN`- and `ERROR`-level messages that get emitted with this exact code path, it should be fine to downgrade this to `INFO`.




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

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