C0urante commented on a change in pull request #10014:
URL: https://github.com/apache/kafka/pull/10014#discussion_r590637805
##########
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:
If the read to end doesn't complete after 30 seconds, the call doesn't
return silently, but throws an exception. This in itself may not be great (we
could catch exceptions caused by the call to
`KafkaConfigBackingStore::putSessionKey` instead of allowing them to kill the
entire worker), but it's still impossible for an accidental call to
`WorkerGroupMember::poll` with `Long.MAX_VALUE`.
----------------------------------------------------------------
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:
[email protected]