dcapwell commented on code in PR #17:
URL: https://github.com/apache/cassandra-accord/pull/17#discussion_r1110192880


##########
accord-core/src/main/java/accord/local/Node.java:
##########
@@ -197,12 +202,12 @@ public void withEpoch(long epoch, Runnable runnable)
         else
         {
             configService.fetchTopologyForEpoch(epoch);
-            topology.awaitEpoch(epoch).addListener(runnable);
+            topology.awaitEpoch(epoch).addCallback(runnable);
         }
     }
 
     @Inline
-    public <T> Future<T> withEpoch(long epoch, Supplier<Future<T>> supplier)
+    public <T> AsyncResult<T> withEpoch(long epoch, Supplier<AsyncResult<T>> 
supplier)

Review Comment:
   Looking at the usage I still think this should be `Chain` and not `Result.  
`SimpleProgressLog` is one of the main callers from this patch and this adds 2 
steps in the chain, so rather than turning to result eager we can do it at the 
final caller site, such as in 
`accord.impl.SimpleProgressLog.Instance.State.NonHomeState#run`; this could 
also call `begin` rather than `addCallback` as they have the same impact, but 
would be cheaper to do `begin`?



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