StefanRRichter commented on a change in pull request #7866: [FLINK-11730]
[State Backends] Make HeapKeyedStateBackend follow the builder pattern
URL: https://github.com/apache/flink/pull/7866#discussion_r262062202
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamTaskStateInitializerImpl.java
##########
@@ -266,6 +266,11 @@ protected OperatorStateBackend operatorStateBackend(
taskInfo.getNumberOfParallelSubtasks(),
taskInfo.getIndexOfThisSubtask());
+ // Now restore processing is included in backend
building/constructing process, so we need to make sure
+ // each stream constructed in restore could also be closed in
case of task cancel, for example the data
+ // input stream opened for serDe during restore.
+ CloseableRegistry cancelStreamRegistryForRestore = new
CloseableRegistry();
+
backendCloseableRegistry.registerCloseable(cancelStreamRegistryForRestore);
Review comment:
It seems like there is still no matching `unregister` call for this, so that
means in theory `cancelStreamRegistryForRestore` is never removed from
`backendCloseableRegistry` until `backendCloseableRegistry` is closed, right?
But I would expect that we can close and remove
`cancelStreamRegistryForRestore` after calling `createAndRestore` now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services