Savonitar commented on code in PR #26861:
URL: https://github.com/apache/flink/pull/26861#discussion_r2247536470
##########
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java:
##########
@@ -612,6 +613,7 @@ private void doRun() {
// need to be undone in the end
Map<String, Future<Path>> distributedCacheEntries = new HashMap<>();
TaskInvokable invokable = null;
+ AutoCloseableRegistry cleanUpRegistry = new AutoCloseableRegistry();
Review Comment:
I notice the registry is created for every task run, but it's only actually
used in the failure case.
What do you think about adding a comment like
`// Registry for actions that should be run if the task fails `
That would help future readers understand why it's unused on the success
path.
--
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]