ableegoldman commented on code in PR #18275:
URL: https://github.com/apache/kafka/pull/18275#discussion_r1893473367


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/metrics/RocksDBMetricsRecorder.java:
##########
@@ -462,8 +462,10 @@ public void record(final long now) {
             writeStallDuration += 
valueProviders.statistics.getAndResetTickerCount(TickerType.STALL_MICROS);
             bytesWrittenDuringCompaction += 
valueProviders.statistics.getAndResetTickerCount(TickerType.COMPACT_WRITE_BYTES);
             bytesReadDuringCompaction += 
valueProviders.statistics.getAndResetTickerCount(TickerType.COMPACT_READ_BYTES);
-            numberOfOpenFiles += 
valueProviders.statistics.getAndResetTickerCount(TickerType.NO_FILE_OPENS)
-                - 
valueProviders.statistics.getAndResetTickerCount(TickerType.NO_FILE_CLOSES);
+
+            // NO_FILE_CLOSES metric was removed in RocksDB 9.7.3.
+            // This now tracks the total number of file opens since the last 
reset.
+            numberOfOpenFiles += 
valueProviders.statistics.getAndResetTickerCount(TickerType.NO_FILE_OPENS);

Review Comment:
   Tend to agree that changing semantics is no good, but it sounds like the new 
metric will be useful -- is it possible to deprecate the old one and introduce 
a new one that corresponds to the same underlying thing? I really don't know 
anything about how we expose the RocksDB metrics though so Bruno is probably 
better suited to chime in



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