Kafka
  1. Kafka
  2. KAFKA-879

In system test, read the new leader from zookeeper instead of broker log on completion of become-leader state transition

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: None
    • Labels:

      Description

      Currently the system test reads the new leader from a broker log statement on completion of become-leader state transition. The log statements can change with time and can also move around.

      We can read the leader info from zookeeper given a topic, partition. The path is #2 at https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeper. The Zookeeper data structures are unlikely to change in foreseeable future.

        Activity

        Swapnil Ghike created issue -
        Hide
        John Fung added a comment -

        Uploaded kafka-879-v1.patch

        Show
        John Fung added a comment - Uploaded kafka-879-v1.patch
        John Fung made changes -
        Field Original Value New Value
        Attachment kafka-879-v1.patch [ 12590308 ]
        Hide
        John Fung added a comment -

        kafka-879-v1.patch contains the change to query zookeeper to find out the leader change.

        However, the info provided by zookeeper does not include the timestamp detailed enough to determine the leader election latency. Therefore, the leader election latency validation is disabled in the patch.

        Please note that the leader election latency retrieved from the log messages is not accurate though.

        Show
        John Fung added a comment - kafka-879-v1.patch contains the change to query zookeeper to find out the leader change. However, the info provided by zookeeper does not include the timestamp detailed enough to determine the leader election latency. Therefore, the leader election latency validation is disabled in the patch. Please note that the leader election latency retrieved from the log messages is not accurate though.
        John Fung made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Jun Rao added a comment -

        Thanks for the patch. Committed to 0.8.

        Show
        Jun Rao added a comment - Thanks for the patch. Committed to 0.8.
        Jun Rao made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.8 [ 12317244 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            John Fung
            Reporter:
            Swapnil Ghike
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development