[ https://issues.apache.org/jira/browse/KAFKA-16466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Arthur updated KAFKA-16466: --------------------------------- Description: In some cases in QuorumController, we throw exceptions from the control manager methods. Unless these are explicitly caught and handled, they will eventually bubble up to the ControllerReadEvent/ControllerWriteEvent an hit the generic error handler. In the generic error handler of QuorumController, we examine the exception to determine if it is a fault or not. In the case where it is not a fault, we log the error like: {code:java} log.info("{}: {}", name, failureMessage); {code} which results in messages like {code:java} [2024-04-02 16:08:38,078] INFO [QuorumController id=3000] registerBroker: event failed with UnsupportedVersionException in 167 microseconds. (org.apache.kafka.controller.QuorumController:544) {code} In this case, the exception actually has more details in its own message {code:java} Unable to register because the broker does not support version 8 of metadata.version. It wants a version between 20 and 20, inclusive. {code} We should include the exception's message in the log output for non-fault errors as it includes very useful debugging info. This was found while writing an integration test for KRaft migration where the brokers and controllers have a mismatched MetadataVersion. was: In some cases in QuorumController, we throw exceptions from the control manager methods. Unless these are explicitly caught and handled, they will eventually bubble up to the ControllerReadEvent/ControllerWriteEvent an hit the generic error handler. In the generic error handler of QuorumController, we examine the exception to determine if it is a fault or not. In the case where it is not a fault, we log the error like: {code:java} log.info("{}: {}", name, failureMessage); {code} which results in messages like {code:java} [2024-04-02 16:08:38,078] INFO [QuorumController id=3000] registerBroker: event failed with UnsupportedVersionException in 167 microseconds. (org.apache.kafka.controller.QuorumController:544) {code} In this case, the exception actually has more details in its own message {code:java} Unable to register because the broker does not support version 8 of metadata.version. It wants a version between 20 and 20, inclusive. {code} This was found while writing an integration test for KRaft migration where the brokers and controllers have a mismatched MetadataVersion. > QuorumController is swallowing some exception messages > ------------------------------------------------------ > > Key: KAFKA-16466 > URL: https://issues.apache.org/jira/browse/KAFKA-16466 > Project: Kafka > Issue Type: Bug > Components: controller > Affects Versions: 3.7.0 > Reporter: David Arthur > Priority: Major > Labels: good-first-issue > Fix For: 3.8.0, 3.7.1 > > > In some cases in QuorumController, we throw exceptions from the control > manager methods. Unless these are explicitly caught and handled, they will > eventually bubble up to the ControllerReadEvent/ControllerWriteEvent an hit > the generic error handler. > In the generic error handler of QuorumController, we examine the exception to > determine if it is a fault or not. In the case where it is not a fault, we > log the error like: > {code:java} > log.info("{}: {}", name, failureMessage); > {code} > which results in messages like > {code:java} > [2024-04-02 16:08:38,078] INFO [QuorumController id=3000] registerBroker: > event failed with UnsupportedVersionException in 167 microseconds. > (org.apache.kafka.controller.QuorumController:544) > {code} > In this case, the exception actually has more details in its own message > {code:java} > Unable to register because the broker does not support version 8 of > metadata.version. It wants a version between 20 and 20, inclusive. > {code} > We should include the exception's message in the log output for non-fault > errors as it includes very useful debugging info. > This was found while writing an integration test for KRaft migration where > the brokers and controllers have a mismatched MetadataVersion. -- This message was sent by Atlassian Jira (v8.20.10#820010)