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

TestUtils.waitUntilLeaderIsElectedOrChanged may wait longer than it needs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.2.0
    • 0.8.2.0
    • None
    • None

    Description

      The way that waitUntilLeaderIsElectedOrChanged() works is to wait for a ZK callback on leader change. However, if the leader is already elected (and won't change) at the time waitUntilLeaderIsElectedOrChanged() is called, this function will wait for the full timeout, which is unnecessary.

      Attachments

        1. KAFKA-1390.patch
          94 kB
          Jun Rao

        Activity

          People

            junrao Jun Rao
            junrao Jun Rao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: