You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "nicktelford (via GitHub)" <gi...@apache.org> on 2023/09/05 11:01:07 UTC

[GitHub] [kafka] nicktelford commented on a diff in pull request #14317: KAFKA-13973: Fix inflated block cache metrics

nicktelford commented on code in PR #14317:
URL: https://github.com/apache/kafka/pull/14317#discussion_r1315734550


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/metrics/RocksDBMetricsRecorder.java:
##########
@@ -373,14 +373,14 @@ private Gauge<BigInteger> gaugeToComputeBlockCacheMetrics(final String propertyN
                         // values of RocksDB properties are of type unsigned long in C++, i.e., in Java we need to use
                         // BigInteger and construct the object from the byte representation of the value
                         result = new BigInteger(1, longToBytes(
-                            valueProvider.db.getAggregatedLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)
+                            valueProvider.db.getLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)
                         ));
                         break;
                     } else {
                         // values of RocksDB properties are of type unsigned long in C++, i.e., in Java we need to use
                         // BigInteger and construct the object from the byte representation of the value
                         result = result.add(new BigInteger(1, longToBytes(
-                            valueProvider.db.getAggregatedLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)
+                            valueProvider.db.getLongProperty(ROCKSDB_PROPERTIES_PREFIX + propertyName)

Review Comment:
   Yeah, so block caches are configurable per-CF in both RocksDB and Speedb, but the specific implementation in `TimestampedRocksDBStore` always assigns the same block cache to both column families. In fact, the design of `RocksDBStore` makes it difficult to assign different block caches to column families.
   
   The only way an implementation could have different block caches for different column families is if `RocksDBStore` was extended and overridden, such that the configuration of the `TableFormatConfig` is provided per-CF. In which case, such a custom implementation would necessitate a custom `RocksDBMetricsRecorder`, as it's tightly coupled to `RocksDBStore` anyway.



-- 
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: jira-unsubscribe@kafka.apache.org

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