Zakelly commented on code in PR #24322:
URL: https://github.com/apache/flink/pull/24322#discussion_r1507349008


##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricMonitor.java:
##########
@@ -114,7 +114,14 @@ private void setProperty(RocksDBNativePropertyMetricView 
metricView) {
         try {
             synchronized (lock) {
                 if (rocksDB != null) {
-                    long value = rocksDB.getLongProperty(metricView.handle, 
metricView.property);
+                    long value =
+                            metricView.property.contains(
+                                            
RocksDBProperty.NumFilesAtLevel.getRocksDBProperty())
+                                    ? Long.parseLong(
+                                            rocksDB.getProperty(
+                                                    metricView.handle, 
metricView.property))
+                                    : rocksDB.getLongProperty(
+                                            metricView.handle, 
metricView.property);

Review Comment:
   If so, I'm wandering would it be better to define a Type for 
`RocksDBNativePropertyMetricView` and handle differently here by different 
type? And @masteryhx do you have some comments here?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to