ableegoldman commented on code in PR #12903:
URL: https://github.com/apache/kafka/pull/12903#discussion_r1041651458


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java:
##########
@@ -81,9 +85,13 @@ public synchronized void resize(final long 
newCacheSizeBytes) {
                 return;
             }
             final CircularIterator<NamedCache> circularIterator = new 
CircularIterator<>(caches.values());
-            while (sizeBytes() > maxCacheSizeBytes) {
+            while (sizeInBytes.get() > maxCacheSizeBytes) {
                 final NamedCache cache = circularIterator.next();
-                cache.evict();
+                synchronized (cache) {

Review Comment:
   If that makes sense to you feel free to do in a followup PR or just file a 
ticket, there are plenty of people looking to dip their toes into AK with 
simple patches like that.
   
   Not at all married to the idea, though, so also feel free to ignore 🙂 



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to