1996fanrui commented on code in PR #21443: URL: https://github.com/apache/flink/pull/21443#discussion_r1043185697
########## flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java: ########## @@ -1614,6 +1617,15 @@ List<RecordWriter<SerializationDelegate<StreamRecord<OUT>>>> createRecordWriters return recordWriters; } + private static void replaceForwardPartitionerIfConsumerParallelismDoesNotMatch( + Environment environment, NonChainedOutput streamOutput) { + if (streamOutput.getPartitioner() instanceof ForwardPartitioner + && streamOutput.getConsumerParallelism() + != environment.getTaskInfo().getNumberOfParallelSubtasks()) { + streamOutput.setPartitioner(new RescalePartitioner<>()); Review Comment: If flink users set the rescale manually, this problem also exists. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org