splett2 commented on code in PR #18277: URL: https://github.com/apache/kafka/pull/18277#discussion_r1936085535
########## 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: i don't think that's right. even if the broker shut down and restarted without data loss, we should perform ISR state/leadership transitions. i think the only behavior difference should be whether or not we remove the broker from the ELR? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org