CalvinConfluent commented on code in PR #14706:
URL: https://github.com/apache/kafka/pull/14706#discussion_r1399579994


##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -327,10 +333,12 @@ public ControllerResult<BrokerRegistrationReply> 
registerBroker(
                 ", but got cluster ID " + request.clusterId());
         }
         int brokerId = request.brokerId();
+        List<ApiMessageAndVersion> records = new ArrayList<>();
         BrokerRegistration existing = brokerRegistrations.get(brokerId);
-        if (version < 2 || existing == null || request.previousBrokerEpoch() 
!= existing.epoch()) {
-            // TODO(KIP-966): Update the ELR if the broker has an unclean 
shutdown.
-            log.debug("Received an unclean shutdown request");

Review Comment:
   Actually, the server may receive old registration requests due to poor 
network conditions or during rolling upgrades. I think we should also treat the 
old version requests as unclean shutdowns.



##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -327,10 +333,12 @@ public ControllerResult<BrokerRegistrationReply> 
registerBroker(
                 ", but got cluster ID " + request.clusterId());
         }
         int brokerId = request.brokerId();
+        List<ApiMessageAndVersion> records = new ArrayList<>();
         BrokerRegistration existing = brokerRegistrations.get(brokerId);
-        if (version < 2 || existing == null || request.previousBrokerEpoch() 
!= existing.epoch()) {
-            // TODO(KIP-966): Update the ELR if the broker has an unclean 
shutdown.
-            log.debug("Received an unclean shutdown request");

Review Comment:
   Updated.



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