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

Leader Re-election is broken in rev. 1368092

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      Steps to reproduce:

      1. Check out rev. 1368092 and execute the command: $ ./sbt update package

      2. Replace <kafka_home>/system_test/single_host_multi_brokers/bin/run-test.sh with the attached script because the logging message related to "shut down completed" and "leader state transition" has been modified in this revision.

      3. Execute the command bin/run-test.sh

      4. The test seems to be hung.

      5. The reason is that there is no leader re-election happening after the first leader is terminated. By checking the logs, there may be only 1 "completed the leader state transition" log message found in the server logs:

      $ grep "completed the leader state transition" *
      kafka_server_3.log:[2012-08-13 10:07:58,085] INFO Replica Manager on Broker 3, completed the leader state transition for topic mytest partition 0 (kafka.server.ReplicaManager)

      6. The correct behavior as in rev 1367821, re-election log messages are found after leader termination as follows:
      $ grep "completed the leader state transition" *
      kafka_server_1.log:[2012-08-13 09:40:23,542] INFO Broker 1 completed the leader state transition for topic mytest partition 0 (kafka.server.ReplicaManager)
      kafka_server_1.log:[2012-08-13 09:42:17,881] INFO Broker 1 completed the leader state transition for topic mytest partition 0 (kafka.server.ReplicaManager)
      kafka_server_2.log:[2012-08-13 09:40:29,082] INFO Broker 2 completed the leader state transition for topic mytest partition 0 (kafka.server.ReplicaManager)
      kafka_server_3.log:[2012-08-13 09:44:06,695] INFO Broker 3 completed the leader state transition for topic mytest part

      Attachments

        1. run-test.sh
          19 kB
          John Fung

        Activity

          People

            yeyangever Yang Ye
            jfung John Fung
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: