You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mumrah (via GitHub)" <gi...@apache.org> on 2023/04/27 18:53:49 UTC

[GitHub] [kafka] mumrah commented on a diff in pull request #13651: MINOR: remove spurious call to fatalFaultHandler

mumrah commented on code in PR #13651:
URL: https://github.com/apache/kafka/pull/13651#discussion_r1179565744


##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -1275,12 +1271,21 @@ public static List<ApiMessageAndVersion> generateActivationRecords(
         }
         return records;
     }
+
     class CompleteActivationEvent implements ControllerWriteOperation<Void> {
         @Override
         public ControllerResult<Void> generateRecordsAndResult() {
-            List<ApiMessageAndVersion> records = generateActivationRecords(log, logReplayTracker.empty(),
-                zkMigrationEnabled, bootstrapMetadata, featureControl);
-            return ControllerResult.atomicOf(records, null);
+            try {
+                List<ApiMessageAndVersion> records = generateActivationRecords(log,
+                    logReplayTracker.empty(),
+                    zkMigrationEnabled,
+                    bootstrapMetadata,
+                    featureControl);
+                return ControllerResult.atomicOf(records, null);
+            } catch (Throwable t) {
+                throw fatalFaultHandler.handleFault("exception while completing controller " +

Review Comment:
   I think in most other places, we are not inside an event when we call the fault handler in QuorumController. I guess that doesn't matter since it calls `Exit.halt` synchronously?



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org