davidradl commented on code in PR #26696:
URL: https://github.com/apache/flink/pull/26696#discussion_r2154312257


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/datatransfer/CopyDataTransferStrategy.java:
##########
@@ -163,7 +168,10 @@ private HandleAndLocalPath copyFileToCheckpoint(
             List<StreamStateHandle> result =
                     checkpointStreamFactory.duplicate(
                             Collections.singletonList(sourceHandle), 
stateScope);
-            return result.get(0);
+            StreamStateHandle resultStateHandle = result.get(0);
+            tmpResourcesRegistry.registerCloseable(

Review Comment:
   I think it would be useful to add comments / javadoc  around this logic. It 
is not obvious to me why we are discarding state quietly in a copy method - 
some comments to detail the thinking here would be good. 
   
   I think we are copying information for a failure case. It it worth adding at 
least a debug around this cleanup.  



-- 
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]

Reply via email to