wcarlson5 commented on a change in pull request #9572: URL: https://github.com/apache/kafka/pull/9572#discussion_r520693132
########## File path: streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java ########## @@ -71,6 +71,16 @@ public long flushes() { return numFlushes; } + public void resize(final long maxCacheSizeBytes) { + final boolean shrink = maxCacheSizeBytes < this.maxCacheSizeBytes; + this.maxCacheSizeBytes = maxCacheSizeBytes; + if (shrink) { + for (final NamedCache cache : caches.values()) { + maybeEvict(cache.name()); + } Review comment: I would expect it to take a bit to repopulate the cache to be balanced but you are right it probably better to do so evenly ---------------------------------------------------------------- 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