ableegoldman commented on code in PR #12803:
URL: https://github.com/apache/kafka/pull/12803#discussion_r1027510484


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsMetadataState.java:
##########
@@ -459,12 +461,23 @@ private List<StreamsMetadata> 
rebuildMetadataForSingleTopology(final Map<HostInf
         return rebuiltMetadata;
     }
 
+    private final Function<Optional<Set<Integer>>, Integer> getPartition = 
maybeMulticastPartitions -> {
+        if (!maybeMulticastPartitions.isPresent()) {
+            return null;
+        }
+        if (maybeMulticastPartitions.get().size() != 1) {
+            throw new IllegalArgumentException("The partitions returned by 
StreamPartitioner#partitions method when used for fetching KeyQueryMetadata for 
key should be a singleton set");

Review Comment:
   Is it a question of whether it will _only_ work correctly with single 
partitions, or that we can enforce this without any problems? I guess it seems 
like the whole point of this KIP is to give users control over whether to send 
records to other/more partitions, so as long as it doesn't break anything then 
we should allow it -- of course we still need to figure out whether it does 
break anything or not
   
   @bellemare or @vvcephei do you know/have any thoughts on this?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to