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


##########
accord-core/src/main/java/accord/messages/TxnRequest.java:
##########
@@ -37,78 +36,39 @@
 import accord.utils.Invariants;
 import accord.utils.MapReduceConsume;
 
-import static java.lang.Long.min;
-
 public abstract class TxnRequest<R> implements Request, PreLoadContext, 
MapReduceConsume<SafeCommandStore, R>
 {
     public static abstract class WithUnsynced<R> extends TxnRequest<R>
     {
-        public final long minUnsyncedEpoch; // TODO (low priority, clarity): 
can this just always be TxnId.epoch?
-        public final boolean doNotComputeProgressKey;
+        public final long minEpoch; // TODO (low priority, clarity): can this 
just always be TxnId.epoch?
 
         public WithUnsynced(Id to, Topologies topologies, TxnId txnId, 
FullRoute<?> route)
         {
             this(to, topologies, txnId, route, latestRelevantEpochIndex(to, 
topologies, route));
         }
 
-        protected WithUnsynced(Id to, Topologies topologies, TxnId txnId, 
FullRoute<?> route, int startIndex)
-        {
-            this(to, topologies, txnId, txnId.epoch(), route, startIndex);
-        }
-
-        public WithUnsynced(Id to, Topologies topologies, long epoch, 
FullRoute<?> route)
+        public WithUnsynced(Id to, Topologies topologies, FullRoute<?> route)
         {
-            this(to, topologies, TxnId.NONE, epoch, route, 
latestRelevantEpochIndex(to, topologies, route), true);
+            this(to, topologies, TxnId.NONE, route, 
latestRelevantEpochIndex(to, topologies, route));
         }
 
-        protected WithUnsynced(Id to, Topologies topologies, TxnId txnId, long 
epoch, FullRoute<?> route, int startIndex)
-        {
-            this(to, topologies, txnId, epoch, route, startIndex, false);
-        }
-
-        protected WithUnsynced(Id to, Topologies topologies, TxnId txnId, long 
epoch, FullRoute<?> route, int startIndex, boolean doNotComputeProgressKey)
+        protected WithUnsynced(Id to, Topologies topologies, TxnId txnId, 
FullRoute<?> route, int startIndex)
         {
             super(to, topologies, route, txnId, startIndex);
-            this.minUnsyncedEpoch = topologies.oldestEpoch();
-            this.doNotComputeProgressKey = doNotComputeProgressKey || 
doNotComputeProgressKey(topologies, startIndex, epoch, waitForEpoch());
-
-            Ranges ranges = topologies.forEpoch(epoch).rangesForNode(to);
-            if (doNotComputeProgressKey)
-            {
-                Invariants.checkState(txnId.equals(TxnId.NONE) || 
!route.intersects(ranges)); // confirm dest is not a replica on txnId.epoch
-            }
-            else if (Invariants.isParanoid())
-            {
-                long progressEpoch = Math.min(waitForEpoch(), epoch);
-                Ranges computesRangesOn = 
topologies.forEpoch(progressEpoch).rangesForNode(to);
-                if (computesRangesOn == null)
-                    Invariants.checkState(!route.intersects(ranges));
-                else
-                    
Invariants.checkState(route.slice(computesRangesOn).equals(route.slice(ranges)));
-            }
+            this.minEpoch = topologies.oldestEpoch();
         }
 
-        protected WithUnsynced(TxnId txnId, PartialRoute<?> scope, long 
waitForEpoch, long minUnsyncedEpoch, boolean doNotComputeProgressKey)
+        protected WithUnsynced(TxnId txnId, Route<?> scope, long waitForEpoch, 
long minEpoch)
         {
             super(txnId, scope, waitForEpoch);
-            this.minUnsyncedEpoch = minUnsyncedEpoch;
-            this.doNotComputeProgressKey = doNotComputeProgressKey;
-        }
-
-        @Override
-        RoutingKey progressKey()

Review Comment:
   The concept of progress keys has been removed, they were essentially doing 
nothing already. Only the home key was treated differently.



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