cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifesdjeen <...@git.apache.org>
Subject [GitHub] cassandra pull request #267: Consolidate batch write code
Date Fri, 21 Sep 2018 14:34:06 GMT
Github user ifesdjeen commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/267#discussion_r219518928
  
    --- Diff: src/java/org/apache/cassandra/service/StorageProxy.java ---
    @@ -1021,18 +1021,18 @@ private static void syncWriteToBatchlog(Collection<Mutation>
mutations, Collecti
             handler.get();
         }
     
    -    private static void asyncRemoveFromBatchlog(Collection<InetAddressAndPort>
endpoints, UUID uuid)
    +    private static void asyncRemoveFromBatchlog(ReplicaPlan.ForTokenWrite replicaPlan,
UUID uuid)
         {
             MessageOut<UUID> message = new MessageOut<>(MessagingService.Verb.BATCH_REMOVE,
uuid, UUIDSerializer.serializer);
    -        for (InetAddressAndPort target : endpoints)
    +        for (Replica target : replicaPlan.contacts())
             {
                 if (logger.isTraceEnabled())
                     logger.trace("Sending batchlog remove request {} to {}", uuid, target);
     
    -            if (target.equals(FBUtilities.getBroadcastAddressAndPort()))
    -                performLocally(Stage.MUTATION, SystemReplicas.getSystemReplica(target),
() -> BatchlogManager.remove(uuid));
    +            if (target.isLocal())
    --- End diff --
    
    Renamed


---

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


Mime
View raw message