Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-15689

KRaftMigrationDriver not logging the skipped event when expected state is wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.6.0
    • 3.7.0, 3.6.2
    • None
    • None

    Description

      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:

      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] 

      This is because its code has something like this:

      log.info("Expected driver state {} but found {}. Not running this event {}.",
          expectedState, migrationState, this.getClass().getSimpleName()); 

      Of course, the "this" is referring to the KRafrMigrationDriver class.
      It should print the specific skipped event instead.

      Attachments

        Issue Links

          Activity

            People

              ppatierno Paolo Patierno
              ppatierno Paolo Patierno
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: