cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From belliottsmith <>
Subject [GitHub] cassandra pull request #269: Review tr range movements
Date Fri, 21 Sep 2018 08:03:11 GMT
Github user belliottsmith commented on a diff in the pull request:
    --- Diff: src/java/org/apache/cassandra/dht/ ---
    @@ -446,16 +447,14 @@ else if (useStrictConsistency)
                              //The old behavior where we might be asked to fetch ranges we
don't need shouldn't occur anymore.
                              //So it's an error if we don't find what we need.
                              if (oldEndpoints.isEmpty() && toFetch.isTransient())
    -                         {
                                  throw new AssertionError("If there are no endpoints to fetch
from then we must be transitioning from transient to full for range " + toFetch);
    -                         }
    -                         if (!any(oldEndpoints, isSufficient))
    +                         if (toFetch.isFull() && (oldEndpoints.isEmpty() || oldEndpoints.get(0).isTransient()))
    --- End diff --
    I definitely agree the old expression is clearer.
    If you don't like negating `any` (though I find it clearer than `none`, personally, as
it reads "it's not the case that any endpoints is/are sufficient" as opposed to "none endpoints
is/are sufficient"), I've proposed introducing `any` `all` and `none` in [14726](


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message