[ 
https://issues.apache.org/jira/browse/KAFKA-15689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luke Chen resolved KAFKA-15689.
-------------------------------
    Fix Version/s: 3.7.0
       Resolution: Fixed

> KRaftMigrationDriver not logging the skipped event when expected state is 
> wrong
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-15689
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15689
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 3.6.0
>            Reporter: Paolo Patierno
>            Assignee: Paolo Patierno
>            Priority: Minor
>             Fix For: 3.7.0
>
>
> The KRaftMigrationDriver.checkDriverState is used in multiple implementations 
> of theĀ 
> MigrationEvent base class but when it comes to log that an event was skipped 
> because the expected state is wrong, it always log "KRafrMigrationDriver" 
> instead of the skipped event.
> For example, a logging line could be like this:
> {code:java}
> 2023-10-25 12:17:25,460 INFO [KRaftMigrationDriver id=5] Expected driver 
> state ZK_MIGRATION but found SYNC_KRAFT_TO_ZK. Not running this event 
> KRaftMigrationDriver. 
> (org.apache.kafka.metadata.migration.KRaftMigrationDriver) 
> [controller-5-migration-driver-event-handler] {code}
> This is because its code has something like this:
> {code:java}
> log.info("Expected driver state {} but found {}. Not running this event {}.",
>     expectedState, migrationState, this.getClass().getSimpleName()); {code}
> Of course, the "this" is referring to the KRafrMigrationDriver class.
> It should print the specific skipped event instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to