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

max.reserved.broker.id off-by-one error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.1.0
    • config
    • None

    Description

      There's an off-by-one error in the config check / id generation for max.reserved.broker.id setting. The auto-generation will generate max.reserved.broker.id as the initial broker id as it's currently written.

      Not sure what the consequences of this are if there's already a broker with that id as I didn't test that behavior.

      This can return 0 + max.reserved.broker.id:
      https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215

      However, this does a <= check, which is inclusive of max.reserved.broker.id:
      https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986

      Attachments

        Activity

          People

            omkreddy Manikumar
            abraithwaite Alan Braithwaite
            Ismael Juma Ismael Juma
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: