dajac commented on code in PR #12181:
URL: https://github.com/apache/kafka/pull/12181#discussion_r880214925
##########
metadata/src/main/java/org/apache/kafka/controller/BrokerHeartbeatManager.java:
##########
@@ -498,6 +498,23 @@ public UsableBroker next() {
}
}
+ /**
+ * Check if the given broker is active. A broker is active if it is
unfenced,
+ * and not shutting down.
Review Comment:
If preventing unnecessary AlterPartition requests from getting sent to the
controller is the main concern, I think that we have to consider the two cases
where that could happen: 1) broker controlled shutdown; and 2) broker fencing.
At the moment, partition change records are written followed by the fenced
record. In the controlled shutdown case, the fenced records is not written
immediately but only when the broker is given the permission to shutdown.
Adding the shutting down state to the broker's registration improves 1)
because it reduces the time window during which unnecessary AlterPartition
requests could be sent. However it does not help for 2). For 2) we could also
accept that the time window is small anyway because the fenced record is
written immediately after the partition changes so it might be sufficient.
Otherwise, we could perhaps write the fence records first in this case, or add
another state. What's your take on 2)?
I totally agree with the debugging argument.
--
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]