cmccabe commented on code in PR #13407: URL: https://github.com/apache/kafka/pull/13407#discussion_r1175717268
########## metadata/src/main/java/org/apache/kafka/controller/QuorumController.java: ########## @@ -1123,29 +1165,104 @@ private void claim(int epoch) { // Prepend the activate event. It is important that this event go at the beginning // of the queue rather than the end (hence prepend rather than append). It's also // important not to use prepend for anything else, to preserve the ordering here. - queue.prepend(new ControllerWriteEvent<>("completeActivation[" + epoch + "]", - new CompleteActivationEvent())); + ControllerWriteEvent<Void> activationEvent = new ControllerWriteEvent<>("completeActivation[" + epoch + "]", + new CompleteActivationEvent(), + EnumSet.of(DOES_NOT_UPDATE_QUEUE_TIME, RUNS_IN_PREMIGRATION)); + activationEvent.future.whenComplete((__, t) -> { + if (t != null) { + fatalFaultHandler.handleFault("exception while activating controller", t); Review Comment: Yes, I recall now. We always hit the fault handler if `replay` fails, but other issues just trigger a resignation and failover. Since this is a bit special it makes sense to specifically invoke the fault handler. Should we use `exceptionally` here rather than `whenComplete`? -- 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