You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "belliottsmith (via GitHub)" <gi...@apache.org> on 2023/08/02 19:48:20 UTC

[GitHub] [cassandra-accord] belliottsmith commented on a diff in pull request #50: State Eviction

belliottsmith commented on code in PR #50:
URL: https://github.com/apache/cassandra-accord/pull/50#discussion_r1282351956


##########
accord-core/src/main/java/accord/local/CommandStores.java:
##########
@@ -87,44 +88,30 @@ private static class StoreSupplier
             this.shardFactory = shardFactory;
         }
 
-        CommandStore create(int id, RangesForEpochHolder rangesForEpoch)
+        CommandStore create(int id, EpochUpdateHolder rangesForEpoch)
         {
             return shardFactory.create(id, time, agent, this.store, progressLogFactory, rangesForEpoch);
         }
     }
 
-    public static class RangesForEpochHolder
-    {
-        // no need for safe publication; RangesForEpoch members are final, and will be guarded by other synchronization actions
-        protected RangesForEpoch current;
-
-        /**
-         * This is updated asynchronously, so should only be fetched between executing tasks;
-         * otherwise the contents may differ between invocations for the same task.
-         * @return the current RangesForEpoch
-         */
-        public RangesForEpoch get() { return current; }
-    }
-
     static class ShardHolder
     {
         final CommandStore store;
-        final RangesForEpochHolder ranges;
+        RangesForEpoch ranges;

Review Comment:
   The idea actually was that we would avoid changing the data we were looking at for an in-flight operation. But now that I look at this I think we need a stronger guarantee: we need to ensure command processing is deterministic for the work @iamaleksey is doing, so we need to ensure that anything we ask for here is the same as would be returned with *more* information. But that's slightly off-topic. It is very deliberate that we return "stale" information for a command that began processing with that information to hand.



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org