pnowojski commented on code in PR #27783:
URL: https://github.com/apache/flink/pull/27783#discussion_r3015935227
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/RecoveredChannelStateHandler.java:
##########
@@ -147,29 +124,35 @@ public void recover(
}
}
} finally {
- if (!buffer.isRecycled()) {
- buffer.recycleBuffer();
- }
+ buffer.recycleBuffer();
Review Comment:
optional: I guess this is a pre-existing issue. But outisde, the caller is
explicitly
```
// Passing the ownership of buffer to inside.
stateHandler.recover(channelInfo, oldSubtaskIndex, bufferWithContext);
```
so I guess you could simplify this call, and remove both `retainBuffer()`
and `recycleBuffer()` calls? I think nothing in this method should throw?
--
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]