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


##########
accord-core/src/main/java/accord/local/Node.java:
##########
@@ -411,6 +407,12 @@ public void withEpoch(EpochSupplier epochSupplier, 
BiConsumer<Void, Throwable> c
 
     public void withEpoch(long epoch, BiConsumer<Void, Throwable> callback)
     {
+        if (epoch < topology.minEpoch())

Review Comment:
   I think we maybe need to replace `withEpoch` with `withEpochAtLeast` and 
`withEpochExact`. Or maybe we need to add an additional parameter to confirm 
the ranges we want. This would probably be annoying, but we already have some 
inconsistency here - one method checks `hasEpoch` the other `hasAtLeastEpoch`, 
and in one case it would be in principle fine to not `hasEpoch` anymore and we 
probably _don't_ want to fail in this case if we otherwise have enough 
information.
   
   Alternatively, we just pick one or the other behaviour (atLeast or has), and 
we rely on the caller to simply fail if that isn't enough information. 
   
   So... perhaps for now for path of least resistance we _introduce_ both 
methods, but we _default to_ hasEpochAtLeast and migrate as we find time to a 
variant of hasEpoch which can supply Unseekables to verify exist in the event 
the epoch has been removed.



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