cadonna commented on a change in pull request #9098: URL: https://github.com/apache/kafka/pull/9098#discussion_r468802841
########## File path: streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java ########## @@ -204,17 +204,17 @@ private void maybeSetUpStatistics(final Map<String, Object> configs) { } } - private void addValueProvidersToMetricsRecorder(final Map<String, Object> configs) { + private void addValueProvidersToMetricsRecorder() { final TableFormatConfig tableFormatConfig = userSpecifiedOptions.tableFormatConfig(); final Statistics statistics = userSpecifiedStatistics ? null : userSpecifiedOptions.statistics(); - if (tableFormatConfig instanceof BlockBasedTableConfigWithAccessibleCache) { - final Cache cache = ((BlockBasedTableConfigWithAccessibleCache) tableFormatConfig).blockCache(); - metricsRecorder.addValueProviders(name, db, cache, statistics); - } else { - metricsRecorder.addValueProviders(name, db, null, statistics); - log.warn("A table format configuration is used that does not expose the block cache. This means " + - "that metrics that relate to the block cache may be wrong if the block cache is shared."); - } + if (!(tableFormatConfig instanceof BlockBasedTableConfigWithAccessibleCache)) { Review comment: No, it was not intentional. I simply did not think hard enough. I agree with you that we should also allow `PlainTableConfig`. If users use the PlainTable format they should already expect that block cache specific metrics do not show up or report constant zero. Thank you for pointing this out! ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org