cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cassandra] aweisberg commented on a change in pull request #283: CASSANDRA-14459: DynamicEndpointSnitch should never prefer latent replicas
Date Fri, 22 Mar 2019 23:29:59 GMT
aweisberg commented on a change in pull request #283: CASSANDRA-14459: DynamicEndpointSnitch
should never prefer latent replicas
URL: https://github.com/apache/cassandra/pull/283#discussion_r267993106
 
 

 ##########
 File path: src/java/org/apache/cassandra/net/MessagingService.java
 ##########
 @@ -538,7 +541,7 @@ public void resetDroppedMessagesMap(String scope)
     // total dropped message counts for server lifetime
     private final Map<Verb, DroppedMessages> droppedMessagesMap = new EnumMap<>(Verb.class);
 
-    private final List<ILatencySubscriber> subscribers = new ArrayList<ILatencySubscriber>();
+    private final Set<ILatencySubscriber> latencySubscribers = new CopyOnWriteArraySet<>();
 
 Review comment:
   Also why is this a list when we only ever have one thing being notified? I mean I guess
it's fine to catch snitch reconfiguration races, but seems like overkill since we don't really
know if that works anyways.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message