kevin-wu24 commented on code in PR #21619:
URL: https://github.com/apache/kafka/pull/21619#discussion_r2879844436


##########
core/src/main/scala/kafka/server/ControllerRegistrationManager.scala:
##########
@@ -267,6 +267,7 @@ class ControllerRegistrationManager(
     }
 
     override def onTimeout(): Unit = {
+      pendingRpc = false

Review Comment:
   >  That means that those timeouts guarantee not to receive a response. Can 
we confirm this?
   
   I'm a bit confused on this one, maybe I am misunderstanding. If the local 
node has not sent a request to the active controller, how can we get a reponse?
   
   > It is possible for the active controller to receive multiple registration 
requests for the same incarnation. How does the controller handle that case? 
Are the idempotent?
   
   From my reading of the code, the active controller does not do anything 
special when handling the request. If it gets multiple registration requests 
for the same incarnation, it will write multiple `RegisterControllerRecords` 
for that incarnation. However, I believe the handling of these duplicate 
records in the generation of `ClusterImage#controllers + ClusterDelta` makes 
this registration idempotent, since `controllers` is of type 
`Map<Integer,ControllerRegistration>` where the node id is the key.



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