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

Fetcher.getTopicMetadata() should return all partitions for each requested topic

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0.2, 1.0.0
    • Fix Version/s: 2.0.1, 2.1.0
    • Component/s: clients
    • Labels:
      None

      Description

      if (!shouldRetry) {
         HashMap<String, List<PartitionInfo>> topicsPartitionInfos = new HashMap<>();
         for (String topic : cluster.topics())
            topicsPartitionInfos.put(topic, cluster.availablePartitionsForTopic(topic));
         return topicsPartitionInfos;
      }
      

      this leads to inconsistent behavior upstream, for example in KafkaConsumer.partitionsFor(), where if there's valid metadata all partitions would be returned, whereas if MD doesnt exist (or has expired) a subset of partitions (only the healthy ones) would be returned.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                radai radai rosenblatt
                Reporter:
                radai radai rosenblatt
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: