cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aweisberg <...@git.apache.org>
Subject [GitHub] cassandra pull request #224: 14405 replicas
Date Wed, 16 May 2018 17:06:05 GMT
Github user aweisberg commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/224#discussion_r187476449
  
    --- Diff: src/java/org/apache/cassandra/db/view/ViewBuilder.java ---
    @@ -135,14 +137,15 @@ private synchronized void build()
             }
     
             // Get the local ranges for which the view hasn't already been built nor it's
building
    -        Set<Range<Token>> newRanges = StorageService.instance.getLocalRanges(ksName)
    -                                                             .stream()
    -                                                             .map(r -> r.subtractAll(builtRanges))
    -                                                             .flatMap(Set::stream)
    -                                                             .map(r -> r.subtractAll(pendingRanges.keySet()))
    -                                                             .flatMap(Set::stream)
    -                                                             .collect(Collectors.toSet());
    -
    +        ReplicaSet replicatedRanges = StorageService.instance.getLocalReplicas(ksName);
    +        Replicas.checkFull(StorageService.instance.getLocalReplicas(ksName));
    +        Set<Range<Token>> newRanges = replicatedRanges.asRangeSet()
    --- End diff --
    
    Also just iterating here. You don't even need Collection2 you can unwrap it in the first
map.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message