StefanRRichter commented on a change in pull request #6814: 
[FLINK-10423][rocksdb][metrics] rocksdb native metrics monitor
URL: https://github.com/apache/flink/pull/6814#discussion_r224529147
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
 ##########
 @@ -606,6 +627,17 @@ private RocksDB openDB(
                Preconditions.checkState(1 + 
stateColumnFamilyDescriptors.size() == stateColumnFamilyHandles.size(),
                        "Not all requested column family handles have been 
created");
 
+               if (this.metricOptions.isEnabled()) {
+                       this.nativeMetricMonitor = new 
RocksDBNativeMetricMonitor(
+                               dbRef,
+                               rocksDBResourceGuard,
+                               metricOptions,
+                               operatorMetricGroup
+                       );
+
+                       
this.cancelStreamRegistry.registerCloseable(nativeMetricMonitor);
 
 Review comment:
   I think this is not a good way for a clean shutdown. Instead I would suggest 
to close this in the `dispose()` method.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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