ableegoldman commented on a change in pull request #9568: URL: https://github.com/apache/kafka/pull/9568#discussion_r522591645
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java ########## @@ -575,17 +577,22 @@ private void setRepartitionTopicMetadataNumberOfPartitions(final Map<String, Int } } - // if we still have not found the right number of partitions, - // another iteration is needed if (numPartitions == null) { numPartitionsNeeded = true; + log.trace("Unable to determine number of partitions for {}, another iteration is needed", + repartitionSourceTopic); } else { - repartitionTopicMetadata.get(topicName).setNumberOfPartitions(numPartitions); + repartitionTopicMetadata.get(repartitionSourceTopic).setNumberOfPartitions(numPartitions); + progressMadeThisIteration = true; } } } } - } while (numPartitionsNeeded); + } while (numPartitionsNeeded && progressMadeThisIteration); Review comment: Mm yeah that does sound cleaner, will do ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org