You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by if...@apache.org on 2020/10/22 07:51:46 UTC

[cassandra] branch trunk updated (095540d -> bf1ea94)

This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


    from 095540d  Merge branch 'cassandra-3.11' into trunk
     add 3cba8d8  Decomissioned nodes are picked for gossip when unreachable nodes are considered for gossiping
     add 56f6cd9  Merge branch 'cassandra-3.0' into cassandra-3.11
     new bf1ea94  Merge branch 'cassandra-3.11' into trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/java/org/apache/cassandra/gms/Gossiper.java            | 14 +++++++++-----
 src/java/org/apache/cassandra/service/LoadBroadcaster.java |  2 ++
 2 files changed, 11 insertions(+), 5 deletions(-)


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


[cassandra] 01/01: Merge branch 'cassandra-3.11' into trunk

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit bf1ea945b6fb1efb1730a3b8973325a26d51be39
Merge: 095540d 56f6cd9
Author: Alex Petrov <ol...@gmail.com>
AuthorDate: Thu Oct 22 09:50:14 2020 +0200

    Merge branch 'cassandra-3.11' into trunk

 src/java/org/apache/cassandra/gms/Gossiper.java            | 14 +++++++++-----
 src/java/org/apache/cassandra/service/LoadBroadcaster.java |  2 ++
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index 8f8d535,0e46767..316a3cd
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -32,8 -31,7 +32,9 @@@ import com.google.common.annotations.Vi
  import com.google.common.base.Throwables;
  import com.google.common.collect.ImmutableList;
  import com.google.common.collect.ImmutableMap;
 +import com.google.common.collect.Iterables;
 +import com.google.common.collect.ImmutableSet;
+ import com.google.common.collect.Sets;
  import com.google.common.util.concurrent.ListenableFutureTask;
  import com.google.common.util.concurrent.Uninterruptibles;
  
@@@ -757,9 -692,6 +758,8 @@@ public class Gossiper implements IFailu
                  tokens = Collections.singletonList(StorageService.instance.getTokenMetadata().partitioner.getRandomToken());
              }
  
-             // do not pass go, do not collect 200 dollars, just gtfo
 +            long expireTime = computeExpireTime();
 +            epState.addApplicationState(ApplicationState.STATUS_WITH_PORT, StorageService.instance.valueFactory.left(tokens, expireTime));
              epState.addApplicationState(ApplicationState.STATUS, StorageService.instance.valueFactory.left(tokens, computeExpireTime()));
              handleMajorStateChange(endpoint, epState);
              Uninterruptibles.sleepUninterruptibly(intervalInMillis * 4, TimeUnit.MILLISECONDS);
@@@ -784,16 -716,16 +784,16 @@@
       * @param epSet   a set of endpoint from which a random endpoint is chosen.
       * @return true if the chosen endpoint is also a seed.
       */
 -    private boolean sendGossip(MessageOut<GossipDigestSyn> message, Set<InetAddress> epSet)
 +    private boolean sendGossip(Message<GossipDigestSyn> message, Set<InetAddressAndPort> epSet)
      {
-         List<InetAddressAndPort> liveEndpoints = ImmutableList.copyOf(epSet);
 -        List<InetAddress> endpoints = ImmutableList.copyOf(epSet);
++        List<InetAddressAndPort> endpoints = ImmutableList.copyOf(epSet);
  
-         int size = liveEndpoints.size();
+         int size = endpoints.size();
          if (size < 1)
              return false;
          /* Generate a random number from 0 -> size */
          int index = (size == 1) ? 0 : random.nextInt(size);
-         InetAddressAndPort to = liveEndpoints.get(index);
 -        InetAddress to = endpoints.get(index);
++        InetAddressAndPort to = endpoints.get(index);
          if (logger.isTraceEnabled())
              logger.trace("Sending a GossipDigestSyn to {} ...", to);
          if (firstSynSendAt == 0)
@@@ -825,7 -754,8 +825,10 @@@
              double prob = unreachableEndpointCount / (liveEndpointCount + 1);
              double randDbl = random.nextDouble();
              if (randDbl < prob)
-                 sendGossip(message, unreachableEndpoints.keySet());
++            {
+                 sendGossip(message, Sets.filter(unreachableEndpoints.keySet(),
 -                                                ep -> !isDeadState(endpointStateMap.get(ep))));
++                                                ep -> !isDeadState(getEndpointStateMap().get(ep))));
++            }
          }
      }
  


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