ifesdjeen commented on code in PR #204:
URL: https://github.com/apache/cassandra-accord/pull/204#discussion_r2149526194


##########
accord-core/src/main/java/accord/impl/progresslog/WaitingState.java:
##########
@@ -23,9 +23,9 @@
 import javax.annotation.Nullable;
 
 import accord.api.ProgressLog.BlockedUntil;
+import accord.api.ProtocolModifiers;

Review Comment:
   nit: seemingly unused



##########
accord-core/src/main/java/accord/topology/TopologyManager.java:
##########
@@ -1191,7 +1191,8 @@ private static long validateMax(long maxEpoch, Epochs 
snapshot)
             return snapshot.currentEpoch;
 
         Invariants.require(snapshot.currentEpoch >= maxEpoch, "current epoch 
%d < provided max %d", snapshot.currentEpoch, maxEpoch);
-        Invariants.require(snapshot.minEpoch() <= maxEpoch, "minimum known 
epoch %d > provided max %d", snapshot.minEpoch(), maxEpoch);
+        if (snapshot.minEpoch() > maxEpoch)

Review Comment:
   I think maxEpoch can still be equal to minEpoch. 
   
   I think we should use the ```if (maxEpoch < snapshot.minEpoch())` condition 
instead.



##########
accord-core/src/main/java/accord/impl/progresslog/WaitingState.java:
##########
@@ -712,15 +712,15 @@ static void fetchRoute(DefaultProgressLog owner, 
BlockedUntil blockedUntil, TxnI
         // TODO (desired): fetch only the route
         // we MUSt allocate before calling withEpoch to register cancellation, 
as async
         BiConsumer<Route<?>, Throwable> invoker = invokeWaitingCallback(owner, 
txnId, blockedUntil, WaitingState::fetchRouteCallback);
-        FetchSomeRoute.fetchSomeRoute(owner.node(), txnId, contactable, new 
IncludingSpecificStoreSelector(owner.commandStore.id()), invoker);
+        accord.coordinate.FetchRoute.fetchRoute(owner.node(), txnId, 
contactable, new IncludingSpecificStoreSelector(owner.commandStore.id()), 
invoker);

Review Comment:
   Nit: maybe it would be better to use callback kind's FetchRoute scoped with 
`CallbackKind`, like `CallbackKind#FetchRoute` so that we do not have to use 
fully qualified name here?



-- 
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-unsubscr...@cassandra.apache.org

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


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

Reply via email to