dlmarion commented on code in PR #3629:
URL: https://github.com/apache/accumulo/pull/3629#discussion_r1267978122
##########
core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java:
##########
@@ -65,12 +66,14 @@ public final class TinyLfuBlockCache implements BlockCache {
.createScheduledExecutorService(1, "TinyLfuBlockCacheStatsExecutor",
true);
public TinyLfuBlockCache(Configuration conf, CacheType type) {
- cache = Caffeine.newBuilder()
- .initialCapacity((int) Math.ceil(1.2 * conf.getMaxSize(type) /
conf.getBlockSize()))
- .weigher((String blockName, Block block) -> {
+ cache = Caches.getInstance().getCache(CacheName.TINYLFU_BLOCK_CACHE,
Review Comment:
Short answer: the block caches won't report via Micrometer
Long answer: The block caches report their stats differently, via a
CacheStats object IIRC. Because `recordStats` is called on line 72 below, the
`recordStats` call in Caches throws an IllegalStateException and reporting via
Micrometer won't occur.
--
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]