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


##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -422,7 +425,15 @@ public ControllerResult<BrokerRegistrationReply> 
registerBroker(
             record.setLogDirs(request.logDirs());
         }
 
-        if (!request.incarnationId().equals(prevIncarnationId)) {
+        boolean isUncleanShutdownRegistration;
+        if (uncleanShutdownDetectionEnabled) {
+            isUncleanShutdownRegistration = storedBrokerEpoch != 
request.previousBrokerEpoch();
+        } else {
+            isUncleanShutdownRegistration = 
!request.incarnationId().equals(prevIncarnationId);
+        }
+        boolean isBrokerStartUp = 
!request.incarnationId().equals(prevIncarnationId);
+
+        if (isUncleanShutdownRegistration) {

Review Comment:
   Yeah, I agree keeping the leader and ISR unchanged may introduce some 
unexpected impact. Let me update.



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