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:10 GMT
Github user aweisberg commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/224#discussion_r188690076
  
    --- Diff: src/java/org/apache/cassandra/service/WriteResponseHandler.java ---
    @@ -42,26 +44,26 @@
         private static final AtomicIntegerFieldUpdater<WriteResponseHandler> responsesUpdater
                 = AtomicIntegerFieldUpdater.newUpdater(WriteResponseHandler.class, "responses");
     
    -    public WriteResponseHandler(Collection<InetAddressAndPort> writeEndpoints,
    -                                Collection<InetAddressAndPort> pendingEndpoints,
    +    public WriteResponseHandler(Replicas writeReplicas,
    +                                Replicas pendingReplicas,
                                     ConsistencyLevel consistencyLevel,
                                     Keyspace keyspace,
                                     Runnable callback,
                                     WriteType writeType,
                                     long queryStartNanoTime)
         {
    -        super(keyspace, writeEndpoints, pendingEndpoints, consistencyLevel, callback,
writeType, queryStartNanoTime);
    +        super(keyspace, writeReplicas, pendingReplicas, consistencyLevel, callback, writeType,
queryStartNanoTime);
             responses = totalBlockFor();
         }
     
    -    public WriteResponseHandler(InetAddressAndPort endpoint, WriteType writeType, Runnable
callback, long queryStartNanoTime)
    +    public WriteResponseHandler(Replica replica, WriteType writeType, Runnable callback,
long queryStartNanoTime)
         {
    -        this(Arrays.asList(endpoint), Collections.<InetAddressAndPort>emptyList(),
ConsistencyLevel.ONE, null, callback, writeType, queryStartNanoTime);
    +        this(new ReplicaList(Collections.singleton(replica)), new ReplicaList(), ConsistencyLevel.ONE,
null, callback, writeType, queryStartNanoTime);
    --- End diff --
    
    Allocates an extra singleton, second replica list could be the immutable empty list instead
of allocating.


---

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


Mime
View raw message