ahanikel commented on code in PR #1427: URL: https://github.com/apache/jackrabbit-oak/pull/1427#discussion_r1599546203
########## oak-segment-remote/src/main/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/PersistentDiskCache.java: ########## @@ -204,7 +204,17 @@ private void cleanUpInternal() { } if (cacheSize.get() > maxCacheSizeBytes * 0.66) { File segment = segmentCacheEntry.getPath().toFile(); - cacheSize.addAndGet(-segment.length()); + long length = segment.length(); + if (length == 0) { + if (logger.isDebugEnabled()) { Review Comment: @smiroslav The debug logs the path which could mean a lot of logging if those zero-sized files occur often. The warnings are always the same string without the file name, so if they occur frequently, they are suppressed and logged as "last warning was repeated nnn times" (or something like that). -- 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: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org