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


##########
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:
   A little bit strange here. Is 'num-files-at-level<N>' a special metrics? Can 
we unify this behavior among all metrics?



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