Github user aweisberg commented on a diff in the pull request: https://github.com/apache/cassandra/pull/269#discussion_r218561162 --- Diff: src/java/org/apache/cassandra/dht/RangeStreamer.java --- @@ -600,39 +628,38 @@ public StreamResultFuture fetchAsync() sources.asMap().forEach((source, fetchReplicas) -> { // filter out already streamed ranges - RangesAtEndpoint available = stateStore.getAvailableRanges(keyspace, StorageService.instance.getTokenMetadata().partitioner); + Pair<Set<Range<Token>>, Set<Range<Token>>> available = stateStore.getAvailableRanges(keyspace, metadata.partitioner); Predicate<FetchReplica> isAvailable = fetch -> { - Replica availableRange = available.byRange().get(fetch.local.range()); - if (availableRange == null) + boolean isInFull = available.left.contains(fetch.local.range()); + boolean isInTrans = available.right.contains(fetch.local.range()); + + if (!isInFull && !isInTrans) //Range is unavailable return false; + + assert isInFull != isInTrans : "Range can't be simultaneously full and transient: " + isInFull + " " + isInTrans; --- End diff -- It can right? Isn't that the point of this whole exercise? We need to fetch it twice and it might have already been fetched both fully and transiently.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org