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


##########
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:
   @masteryhx @Zakelly Thanks for your valuable advice. I have optimized the 
code according to yhx's advice. Please review.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to