cmccabe commented on code in PR #12595: URL: https://github.com/apache/kafka/pull/12595#discussion_r965238094
########## metadata/src/main/java/org/apache/kafka/controller/QuorumController.java: ########## @@ -1148,19 +1225,12 @@ private void renounce() { controllerMetrics.setActive(false); purgatory.failAll(newNotControllerException()); - if (snapshotRegistry.hasSnapshot(lastCommittedOffset)) { - snapshotRegistry.revertToSnapshot(lastCommittedOffset); - authorizer.ifPresent(a -> a.loadSnapshot(aclControlManager.idToAcl())); - } else { - log.info("Unable to find last committed offset {} in snapshot registry; resetting " + - "to empty state.", lastCommittedOffset); - resetToEmptyState(); - authorizer.ifPresent(a -> a.loadSnapshot(Collections.emptyMap())); - needToCompleteAuthorizerLoad = authorizer.isPresent(); - raftClient.unregister(metaLogListener); - metaLogListener = new QuorumMetaLogListener(); - raftClient.register(metaLogListener); + if (!snapshotRegistry.hasSnapshot(lastCommittedOffset)) { + throw new RuntimeException("Unable to find last committed offset " + + lastCommittedEpoch + " in snapshot registry."); Review Comment: the fault handler for the active controller will exit the process, so it is not necessary to call `clusterControl.deactivate` here -- 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