JunRuiLee commented on code in PR #25551:
URL: https://github.com/apache/flink/pull/25551#discussion_r1883191155
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateFactory.java:
##########
@@ -225,21 +227,30 @@ private void createInputChannelsAndTieredStorageService(
String owningTaskName,
InputGateDeploymentDescriptor inputGateDeploymentDescriptor,
SingleInputGate inputGate,
- ResultSubpartitionIndexSet subpartitionIndexSet,
GateBuffersSpec gateBuffersSpec,
InputChannelMetrics metrics) {
ShuffleDescriptor[] shuffleDescriptors =
inputGateDeploymentDescriptor.getShuffleDescriptors();
+ Map<IndexRange, IndexRange> consumedSubpartitionGroups =
+ inputGateDeploymentDescriptor.getConsumedSubpartitionGroups();
+
// Create the input channels. There is one input channel for each
consumed subpartition.
- InputChannel[] inputChannels = new
InputChannel[shuffleDescriptors.length];
+ int inputChannelSize =
calculateNumInputChannels(consumedSubpartitionGroups);
+ InputChannel[] inputChannels = new InputChannel[inputChannelSize];
ChannelStatistics channelStatistics = new ChannelStatistics();
int channelIdx = 0;
final List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs = new
ArrayList<>();
List<List<TierShuffleDescriptor>> tierShuffleDescriptors = new
ArrayList<>();
- for (ShuffleDescriptor descriptor : shuffleDescriptors) {
+ for (int i = 0; i < shuffleDescriptors.length; i++) {
+ Optional<ResultSubpartitionIndexSet> subpartitionIndexSet =
+ getResultSubpartitionIndexSet(consumedSubpartitionGroups,
i);
+ if (subpartitionIndexSet.isEmpty()) {
Review Comment:
I think we should not allow empty subpartition set.
--
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]