Github user belliottsmith commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/269#discussion_r218388108
  
    --- Diff: src/java/org/apache/cassandra/dht/StreamStateStore.java ---
    @@ -54,8 +56,10 @@ public RangesAtEndpoint getAvailableRanges(String 
keyspace, IPartitioner partiti
         @VisibleForTesting
         public boolean isDataAvailable(String keyspace, Token token)
         {
    -        RangesAtEndpoint availableRanges = getAvailableRanges(keyspace, 
token.getPartitioner());
    -        return availableRanges.ranges().stream().anyMatch(range -> 
range.contains(token));
    +        Pair<Set<Range<Token>>, Set<Range<Token>>> availableRanges = 
getAvailableRanges(keyspace, token.getPartitioner());
    +
    +        return Streams.concat(availableRanges.left.stream(),
    +                              
availableRanges.right.stream()).anyMatch(range -> range.contains(token));
    --- End diff --
    
    It would be clearer IMO to have .anyMatch indent on the newline, preferably 
inline with .concat() - I initially read this as only performing the anyMatch 
on right, and was trying to figure out why


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to