You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/11/13 03:31:29 UTC

[GitHub] [kafka] ableegoldman commented on a change in pull request #9568: KAFKA-10689: fix windowed FKJ topology and put checks in assignor to avoid infinite loops

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:
users@infra.apache.org