1996fanrui commented on code in PR #29065:
URL: https://github.com/apache/flink/pull/29065#discussion_r3980736514
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/SequentialChannelStateReaderImpl.java:
##########
@@ -103,6 +104,11 @@ public Optional<FetchedChannelState> readInputData(
// stateHandler.close() (above) has flushed the filter writer and
published the
// produced spill file, so read getProducedChannelState() after
the close completes.
return Optional.ofNullable(stateHandler.getProducedChannelState());
+ } catch (Throwable t) {
+ // The state was not handed off, so no drainer will release its
spill files: delete
+ // them here (quietly, so the original failure is not masked).
+ IOUtils.closeQuietly(stateHandler.getProducedChannelState());
Review Comment:
Right, this brought the original issue back.
Fixed with your option (1) from that thread:
`AbstractSpillingHandler#discardSpilledFiles()` deletes the whole spill
directory, and the catch in readInputData calls it, so it no longer depends on
producedChannelState having been assigned.
I originally wanted to avoid adding a method on the handler for this, but
after the detour it turned out to be the simplest fix anyway.
--
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]