ben-manes commented on issue #1975: URL: https://github.com/apache/accumulo/issues/1975#issuecomment-807143548
I would guess that you are observing a livelock due to recursive `computeIfAbsent` calls being unsupported by `ConcurrentHashMap`. You can verify this using jstack. The TinyLFU cache uses this method for the loader calls, https://github.com/apache/accumulo/blob/1dc72fce2c781dee597c8c11876a3bc6c321c199/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java#L251-L254 In comparison, the Lru cache does this using the racy get-load-put idiom, https://github.com/apache/accumulo/blob/1dc72fce2c781dee597c8c11876a3bc6c321c199/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/SynchronousLoadingBlockCache.java#L73-L83 The benefit of `computeIfAbsent` is that it protects against [cache stampedes](https://medium.com/@DoorDash/avoiding-cache-stampede-at-doordash-55bbf596d94b). If this can be recursive, then it should be updated to the racy style like the Lru cache. -- 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: [email protected]
