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


##########
accord-core/src/main/java/accord/topology/TopologyManager.java:
##########
@@ -892,8 +1055,11 @@ private <C, K extends Routables<?>, T> T atLeast(K 
select, long minEpoch, long m
 
         if (i == snapshot.epochs.length)
         {
-            if (!select.isEmpty())
-                throw new IllegalArgumentException("Ranges " + select + " 
could not be found");
+            // Epochs earlier than minEpoch might have been GC'd, so we can 
not collect
+            // matching ranges for them. However, if ranges were still present 
in the min epoch,
+            // we have reported them.
+            if (!select.isEmpty() && 
!select.without(snapshot.get(minEpoch).global.ranges).isEmpty())

Review Comment:
   maybe move to `Invariants.requireArgument`, or creating the exception with 
`Invariants.illegalArgument`?



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