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


##########
accord-core/src/main/java/accord/coordinate/tracking/FastPathTracker.java:
##########
@@ -30,17 +31,50 @@
 import static accord.coordinate.tracking.AbstractTracker.ShardOutcomes.*;
 
 // TODO (desired, efficiency): if any shard *cannot* take the fast path, and 
all shards have accepted, terminate
-public class FastPathTracker extends 
AbstractTracker<FastPathTracker.FastPathShardTracker, Node.Id>
+public class FastPathTracker extends 
AbstractTracker<FastPathTracker.FastPathQuorumShardTracker>
 {
     private static final ShardOutcome<FastPathTracker> NewFastPathSuccess = 
(tracker, shardIndex) -> {
         --tracker.waitingOnFastPathSuccess;
         return --tracker.waitingOnShards == 0 ? Success : NoChange;
     };
 
-    public static class FastPathShardTracker extends ShardTracker
+    public static class FastPathQuorumShardTracker extends QuorumShardTracker
     {
-        protected int fastPathAccepts, accepts;
-        protected int fastPathFailures, failures;
+        public FastPathQuorumShardTracker(Shard shard)
+        {
+            super(shard);
+        }
+
+        public ShardOutcome<? super FastPathTracker> onQuorumSuccess(Node.Id 
node)
+        {
+            return super.onSuccess(node);
+        }
+
+        public ShardOutcome<? super FastPathTracker> 
onMaybeFastPathSuccess(Node.Id node)
+        {
+            return super.onSuccess(node);
+        }
+
+        public ShardOutcome<? super FastPathTracker> onFailure(@Nonnull 
Node.Id from)
+        {
+            return super.onFailure(from);
+        }
+
+        public boolean hasRejectedFastPath()
+        {
+            return false;
+        }
+
+        public boolean hasMetFastPathCriteria()
+        {
+            return true;

Review Comment:
   Only when talking to _new_ epochs; if the latest epoch is the same as the 
txnId then it's fine.



##########
accord-core/src/main/java/accord/coordinate/tracking/FastPathTracker.java:
##########
@@ -30,17 +31,50 @@
 import static accord.coordinate.tracking.AbstractTracker.ShardOutcomes.*;
 
 // TODO (desired, efficiency): if any shard *cannot* take the fast path, and 
all shards have accepted, terminate
-public class FastPathTracker extends 
AbstractTracker<FastPathTracker.FastPathShardTracker, Node.Id>
+public class FastPathTracker extends 
AbstractTracker<FastPathTracker.FastPathQuorumShardTracker>
 {
     private static final ShardOutcome<FastPathTracker> NewFastPathSuccess = 
(tracker, shardIndex) -> {
         --tracker.waitingOnFastPathSuccess;
         return --tracker.waitingOnShards == 0 ? Success : NoChange;
     };
 
-    public static class FastPathShardTracker extends ShardTracker
+    public static class FastPathQuorumShardTracker extends QuorumShardTracker
     {
-        protected int fastPathAccepts, accepts;
-        protected int fastPathFailures, failures;
+        public FastPathQuorumShardTracker(Shard shard)
+        {
+            super(shard);
+        }
+
+        public ShardOutcome<? super FastPathTracker> onQuorumSuccess(Node.Id 
node)
+        {
+            return super.onSuccess(node);
+        }
+
+        public ShardOutcome<? super FastPathTracker> 
onMaybeFastPathSuccess(Node.Id node)
+        {
+            return super.onSuccess(node);
+        }
+
+        public ShardOutcome<? super FastPathTracker> onFailure(@Nonnull 
Node.Id from)
+        {
+            return super.onFailure(from);
+        }
+
+        public boolean hasRejectedFastPath()
+        {
+            return false;
+        }
+
+        public boolean hasMetFastPathCriteria()
+        {
+            return true;

Review Comment:
   Only when talking to _new_ epochs; if the latest epoch is the same as the 
txnId then it's fine (and should always have been fine)



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