carp84 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_r262044190
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackendBuilder.java
 ##########
 @@ -192,7 +194,8 @@ public RocksDBKeyedStateBackendBuilder(
                        ttlTimeProvider,
                        metricGroup,
                        stateHandles,
-                       keyGroupCompressionDecorator
+                       keyGroupCompressionDecorator,
+                       cancelStreamRegistry
 
 Review comment:
   > I think before when we passed in cancelStreamRegistry, the scope was only 
for controlling streams and closeables during restore.
   
   Got the point. Some minor correction: we don't pass in any registry before, 
and the reason we don't have the issue described in FLINK-11804 is that the 
invocation of `backendInstance.restore` was surrounded by a try-catch clause 
and the whole `backendInstance` will be unregistered from the task registry and 
then disposed, thus the `CloseableRegistry` created inside the backend instance 
will also be closed during the backend's `dispose`. However, after we move 
restore operation into backend's building process, we need to separate the 
`cancelStreamRegistry` used in restore and backend constructing, and make sure 
the one used in restore is registered and handled by the task cancel registry.

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

Reply via email to