Kafka
  1. Kafka
  2. KAFKA-1087

Empty topic list causes consumer to fetch metadata of all topics

    Details

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

      Description

      The ClientUtils fetches metadata for all topics if the topic set is empty.

      If the topic list of a consumer is empty, the following happens if a rebalance is triggered:

      • The fetcher is restarted, fetcher.startConnections() starts a LeaderFinderThread
      • LeaderFinderThread waits on a condition
      • fetcher.startConnections() signals the aforementioned condition
      • LeaderFinderThread obtains metadata for all topics since the topic list is empty.
      1. KAFKA-1087.patch
        0.7 kB
        Swapnil Ghike

        Activity

        Hide
        Swapnil Ghike added a comment -

        Unit tests pass.

        Show
        Swapnil Ghike added a comment - Unit tests pass.
        Hide
        Guozhang Wang added a comment -

        Great find. +1

        PS: Shall we actually enforce topic list as required parameters also besides this fix?

        Show
        Guozhang Wang added a comment - Great find. +1 PS: Shall we actually enforce topic list as required parameters also besides this fix?
        Hide
        Neha Narkhede added a comment -

        Good catch, +1 !

        Show
        Neha Narkhede added a comment - Good catch, +1 !
        Hide
        Neha Narkhede added a comment -

        Checked into 0.8, could you please provide a patch for trunk as well?

        Show
        Neha Narkhede added a comment - Checked into 0.8, could you please provide a patch for trunk as well?
        Hide
        Swapnil Ghike added a comment -

        Same patch should apply fine to trunk.

        Show
        Swapnil Ghike added a comment - Same patch should apply fine to trunk.
        Hide
        Neha Narkhede added a comment -

        Thanks for the patch. Checked into 0.8 and trunk

        Show
        Neha Narkhede added a comment - Thanks for the patch. Checked into 0.8 and trunk

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development