gaborgsomogyi commented on code in PR #27084:
URL: https://github.com/apache/flink/pull/27084#discussion_r2408271344
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/InflightDataRescalingDescriptor.java:
##########
@@ -116,22 +116,20 @@ public static class
InflightDataGateOrPartitionRescalingDescriptor implements Se
public static final InflightDataGateOrPartitionRescalingDescriptor
NO_STATE =
new InflightDataGateOrPartitionRescalingDescriptor(
new int[0],
- RescaleMappings.identity(0, 0),
+ RescaleMappings.SYMMETRIC_IDENTITY,
Collections.emptySet(),
MappingType.IDENTITY) {
private static final long serialVersionUID = 1L;
@Override
public int[] getOldSubtaskInstances() {
- throw new UnsupportedOperationException(
- "Cannot get old subtasks from a descriptor
that represents no state.");
+ return new int[0];
Review Comment:
Maybe we can eliminate some GC:
```
private static final int[] EMPTY_INT_ARRAY = new int[0];
@Override
public int[] getOldSubtaskInstances(int newSubtaskIndex) {
return EMPTY_INT_ARRAY;
}
```
--
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]