jberragan commented on code in PR #93:
URL:
https://github.com/apache/cassandra-analytics/pull/93#discussion_r1840330990
##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/CassandraDataLayer.java:
##########
@@ -338,11 +338,13 @@ else if (clearSnapshotStrategy.hasTTL())
private CompletionStage<Map<String, AvailabilityHint>>
createSnapshot(ClientConfig options, RingResponse ring)
{
Map<String, PartitionedDataLayer.AvailabilityHint> availabilityHints =
new ConcurrentHashMap<>(ring.size());
+ Map<String, Boolean> uniqueInstances = new ConcurrentHashMap<>();
// Fire off create snapshot request across the entire cluster
List<CompletableFuture<Void>> futures =
ring.stream()
.filter(ringEntry -> datacenter == null ||
datacenter.equals(ringEntry.datacenter()))
+ .filter(ringEntry -> uniqueInstances.putIfAbsent(ringEntry.fqdn(),
true) == null)
Review Comment:
Does this assume that the `RingResponse` now returns an entry per vnode?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]