C0urante commented on a change in pull request #10014: URL: https://github.com/apache/kafka/pull/10014#discussion_r590550843
########## File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java ########## @@ -402,7 +402,7 @@ public void tick() { log.debug("Scheduled rebalance at: {} (now: {} nextRequestTimeoutMs: {}) ", scheduledRebalance, now, nextRequestTimeoutMs); } - if (internalRequestValidationEnabled() && keyExpiration < Long.MAX_VALUE) { + if (isLeader() && internalRequestValidationEnabled() && keyExpiration < Long.MAX_VALUE) { Review comment: Good question--this shouldn't be possible since `KafkaConfigBackingStore::putSessionKey` does a flush and read-to-end after dispatching the new session key to the producer: https://github.com/apache/kafka/blob/0e8a84e5d7203765240894873fd2896906dfbc2b/connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java#L456-L471 ---------------------------------------------------------------- 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: us...@infra.apache.org