akalash commented on code in PR #22761:
URL: https://github.com/apache/flink/pull/22761#discussion_r1263545221
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/RecoveredChannelStateHandler.java:
##########
@@ -179,8 +178,14 @@ class ResultSubpartitionRecoveredStateHandler
public BufferWithContext<BufferBuilder> getBuffer(ResultSubpartitionInfo
subpartitionInfo)
throws IOException, InterruptedException {
// request the buffer from any mapped subpartition as they all will
receive the same buffer
- final List<CheckpointedResultSubpartition> channels =
getMappedChannels(subpartitionInfo);
- BufferBuilder bufferBuilder =
channels.get(0).requestBufferBuilderBlocking();
+ ResultPartitionWriter writer =
writers[subpartitionInfo.getPartitionIdx()];
+ if (!(writer instanceof CheckpointedResultPartition)) {
Review Comment:
No, I don't have any good suggestions for now. I just wanted to emphasize
that `ResultSubpartitionRecoveredStateHandler` uses `ResultPartitionWriter` for
the writer while it actually needs `CheckpointedResultPartition`. As a result,
it requires the explicit cast to this type.
So it doesn't look clean solution but since it was here before and I don't
actually think that we should try to improve it in this fix. We just can leave
it as is.
--
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]