junaiddshaukat commented on code in PR #39546:
URL: https://github.com/apache/beam/pull/39546#discussion_r3689346388


##########
runners/kafka-streams/src/main/java/org/apache/beam/runners/kafka/streams/translation/FlattenTranslator.java:
##########
@@ -70,6 +73,7 @@ public void translate(
       String parentProcessor = 
context.getProcessorNameForPCollection(inputPCollectionId);
       parentProcessors.add(parentProcessor);
       upstreamTransformIds.add(parentProcessor);
+      partitionCount = Math.max(partitionCount, 
context.getPartitionCount(inputPCollectionId));

Review Comment:
   It could, and that was a gap. It returns 1 for anything unregistered, and 
otherwise whatever --internalParallelism was set to, which nothing validated. 
Worse than a bad topic: it's also the number of watermark reports a shuffle's 
consumer waits for, so a value below 1 would have left the consumer waiting 
forever rather than failing. The runner now rejects it before translating, and 
I documented the invariant where the count is read.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to