You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2020/08/04 22:43:12 UTC

[cassandra] branch trunk updated (5d968e6 -> f8f0c46)

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

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


    from 5d968e6  computeMaxTTL directly before fetching TTL in TTLTest
     new c94ecec  Check for endpoint collision with hibernating nodes
     new 7976777  Merge branch 'cassandra-3.0' into cassandra-3.11
     new f8f0c46  Merge branch 'cassandra-3.11' into trunk

The 3 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:
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 19 ++++++++++++++++---
 2 files changed, 17 insertions(+), 3 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 br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f8f0c46914bc31939ea8674eca4de4d5bd6233cb
Merge: 5d968e6 7976777
Author: Brandon Williams <br...@apache.org>
AuthorDate: Tue Aug 4 17:38:12 2020 -0500

    Merge branch 'cassandra-3.11' into trunk

 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 19 ++++++++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --cc CHANGES.txt
index 05ec961,749aba2..adc97dd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,15 -1,12 +1,16 @@@
 -3.11.8
 +4.0-beta2
 + * Throw FSWriteError upon write failures in order to apply DiskFailurePolicy (CASSANDRA-15928)
 + * Forbid altering UDTs used in partition keys (CASSANDRA-15933)
 + * Fix version parsing logic when upgrading from 3.0 (CASSANDRA-15973)
 + * Optimize NoSpamLogger use in hot paths (CASSANDRA-15766)
 + * Verify sstable components on startup (CASSANDRA-15945)
 +Merged from 3.11:
 + * stop_paranoid disk failure policy is ignored on CorruptSSTableException after node is up (CASSANDRA-15191)
   * Frozen RawTuple is not annotated with frozen in the toString method (CASSANDRA-15857)
  Merged from 3.0:
+  * Check for endpoint collision with hibernating nodes (CASSANDRA-14599)
   * Operational improvements and hardening for replica filtering protection (CASSANDRA-15907)
 - * stop_paranoid disk failure policy is ignored on CorruptSSTableException after node is up (CASSANDRA-15191)
 - * Forbid altering UDTs used in partition keys (CASSANDRA-15933)
   * Fix empty/null json string representation (CASSANDRA-15896)
 - * 3.x fails to start if commit log has range tombstones from a column which is also deleted (CASSANDRA-15970)
  Merged from 2.2:
   * Fix CQL parsing of collections when the column type is reversed (CASSANDRA-15814)
  
diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index f276fbd,b201763..37ad6bb
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -53,18 -45,21 +53,19 @@@ import org.slf4j.LoggerFactory
  import org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor;
  import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
  import org.apache.cassandra.concurrent.Stage;
 -import org.apache.cassandra.concurrent.StageManager;
  import org.apache.cassandra.config.DatabaseDescriptor;
 -import org.apache.cassandra.config.Schema;
+ import org.apache.cassandra.db.SystemKeyspace;
  import org.apache.cassandra.dht.Token;
 -import org.apache.cassandra.net.IAsyncCallback;
 -import org.apache.cassandra.net.MessageIn;
 -import org.apache.cassandra.net.MessageOut;
 +import org.apache.cassandra.net.RequestCallback;
 +import org.apache.cassandra.net.Message;
  import org.apache.cassandra.net.MessagingService;
  import org.apache.cassandra.service.StorageService;
 -import org.apache.cassandra.utils.CassandraVersion;
  import org.apache.cassandra.utils.FBUtilities;
  import org.apache.cassandra.utils.JVMStabilityInspector;
 -import static org.apache.cassandra.utils.ExecutorUtils.awaitTermination;
 -import static org.apache.cassandra.utils.ExecutorUtils.shutdown;
 +
 +import static org.apache.cassandra.net.NoPayload.noPayload;
 +import static org.apache.cassandra.net.Verb.ECHO_REQ;
 +import static org.apache.cassandra.net.Verb.GOSSIP_DIGEST_SYN;
  
  /**
   * This module is responsible for Gossiping information for the local endpoint. This abstraction
@@@ -879,12 -809,25 +880,25 @@@ public class Gossiper implements IFailu
       * @param epStates - endpoint states in the cluster
       * @return true if it is safe to start the node, false otherwise
       */
 -    public boolean isSafeForStartup(InetAddress endpoint, UUID localHostUUID, boolean isBootstrapping,
 -                                    Map<InetAddress, EndpointState> epStates)
 +    public boolean isSafeForStartup(InetAddressAndPort endpoint, UUID localHostUUID, boolean isBootstrapping,
 +                                    Map<InetAddressAndPort, EndpointState> epStates)
      {
          EndpointState epState = epStates.get(endpoint);
-         // if there's no previous state, or the node was previously removed from the cluster, we're good
-         if (epState == null || isDeadState(epState))
+         // if there's no previous state, we're good
+         if (epState == null)
+             return true;
+ 
+         String status = getGossipStatus(epState);
+ 
+         if (status.equals(VersionedValue.HIBERNATE)
+             && !SystemKeyspace.bootstrapComplete())
+         {
+             logger.warn("A node with the same IP in hibernate status was detected. Was a replacement already attempted?");
+             return false;
+         }
+ 
+         //the node was previously removed from the cluster
+         if (isDeadState(epState))
              return true;
  
          if (isBootstrapping)


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