Kafka
  1. Kafka
  2. KAFKA-457

Leader Re-election is broken in rev. 1368092

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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

      1. run-test.sh
        19 kB
        John Fung

        Activity

        Hide
        John Fung added a comment -

        This script "run-test.sh" contains the following changes
        1. KAFKA-380-v5.patch
        2. Updated log message patterns for looking up leader election in revision 1368092

        Show
        John Fung added a comment - This script "run-test.sh" contains the following changes 1. KAFKA-380 -v5.patch 2. Updated log message patterns for looking up leader election in revision 1368092
        Hide
        Yang Ye added a comment -

        The behaviour of the code is changed after kafka-369 is checked in, and the system tests all work well. So this jira should be marked as resolved.

        Show
        Yang Ye added a comment - The behaviour of the code is changed after kafka-369 is checked in, and the system tests all work well. So this jira should be marked as resolved.
        Hide
        John Fung added a comment -

        Hi Victor,

        Thank you for your fix. I have tested rev. 1373633 for system_test/single_host_multi_brokers/run-test.sh and it is working correctly.

        Regards,
        John

        Show
        John Fung added a comment - Hi Victor, Thank you for your fix. I have tested rev. 1373633 for system_test/single_host_multi_brokers/run-test.sh and it is working correctly. Regards, John

          People

          • Assignee:
            Yang Ye
            Reporter:
            John Fung
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development