belliottsmith commented on code in PR #3108:
URL: https://github.com/apache/cassandra/pull/3108#discussion_r1494818217


##########
src/java/org/apache/cassandra/service/accord/AccordStateCache.java:
##########
@@ -141,36 +141,45 @@ private void maybeEvictSomeNodes()
         while (iter.hasNext() && bytesCached > maxSizeInBytes)
         {
             AccordCachingState<?, ?> node = iter.next();
-            checkState(node.references == 0);
-
-            if (!node.canEvict())
-                continue;
-            /*
-             * TODO (expected, efficiency):
-             *    can this be reworked so we're not skipping unevictable nodes 
everytime we try to evict?
-             */
-            Status status = node.status(); // status() call completes (if 
completeable)

Review Comment:
   Could you explain this a bit more - we've only affected the `LOADING` state, 
not the `SAVING` state. We seem here to only be preventing a `LOADING` node 
from being evicted before being `LOADED`, which is probably a perfectly 
sensible thing to do. But I'm not sure how to map to your explanation.
   
   I can imagine that by evicting a `LOADING` command we might have a handle to 
the entry somewhere that is then updated and should be saved but isn't. But 
that means we've got bad reference counting or something else going on as well?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to