You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jl...@apache.org on 2024/01/23 15:39:17 UTC

(cassandra) branch trunk updated (5d46ff2796 -> ca067ca58a)

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

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


    from 5d46ff2796 Remove dependency on Sigar in favor of OSHI
     add d422eb1f35 Fix storage_compatibility_mode for streaming
     new ca067ca58a Merge branch 'cassandra-5.0' 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:
 CHANGES.txt                                        |  1 +
 build.xml                                          |  4 ++--
 .../config/CassandraRelevantProperties.java        | 16 ++++++-------
 src/java/org/apache/cassandra/config/Config.java   |  2 +-
 .../cassandra/config/DatabaseDescriptor.java       | 22 +++++++++++++-----
 .../org/apache/cassandra/net/MessagingService.java | 26 +++++++++++++++++-----
 .../cassandra/net/OutboundConnectionSettings.java  |  2 +-
 .../cassandra/repair/messages/PrepareMessage.java  |  4 +++-
 .../org/apache/cassandra/tools/BulkLoader.java     |  2 +-
 .../org/apache/cassandra/repair/FuzzTestBase.java  |  2 +-
 10 files changed, 55 insertions(+), 26 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-5.0' into trunk

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

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

commit ca067ca58aecf0308b0428b443b082cacc9f9883
Merge: 5d46ff2796 d422eb1f35
Author: Jacek Lewandowski <le...@gmail.com>
AuthorDate: Tue Jan 23 14:24:06 2024 +0100

    Merge branch 'cassandra-5.0' into trunk
    
    * cassandra-5.0:
      Fix storage_compatibility_mode for streaming

 CHANGES.txt                                        |  1 +
 build.xml                                          |  4 ++--
 .../config/CassandraRelevantProperties.java        | 16 ++++++-------
 src/java/org/apache/cassandra/config/Config.java   |  2 +-
 .../cassandra/config/DatabaseDescriptor.java       | 22 +++++++++++++-----
 .../org/apache/cassandra/net/MessagingService.java | 26 +++++++++++++++++-----
 .../cassandra/net/OutboundConnectionSettings.java  |  2 +-
 .../cassandra/repair/messages/PrepareMessage.java  |  4 +++-
 .../org/apache/cassandra/tools/BulkLoader.java     |  2 +-
 .../org/apache/cassandra/repair/FuzzTestBase.java  |  2 +-
 10 files changed, 55 insertions(+), 26 deletions(-)

diff --cc CHANGES.txt
index 108096a416,485b945791..1a06b877f4
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,15 -1,5 +1,16 @@@
 -5.0-beta2
 +5.1
 + * Remove dependency on Sigar in favor of OSHI (CASSANDRA-16565)
 + * Simplify the bind marker and Term logic (CASSANDRA-18813)
 + * Limit cassandra startup to supported JDKs, allow higher JDKs by setting CASSANDRA_JDK_UNSUPPORTED (CASSANDRA-18688)
 + * Standardize nodetool tablestats formatting of data units (CASSANDRA-19104)
 + * Make nodetool tablestats use number of significant digits for time and average values consistently (CASSANDRA-19015)
 + * Upgrade jackson to 2.15.3 and snakeyaml to 2.1 (CASSANDRA-18875)
 + * Transactional Cluster Metadata [CEP-21] (CASSANDRA-18330)
 + * Add ELAPSED command to cqlsh (CASSANDRA-18861)
 + * Add the ability to disable bulk loading of SSTables (CASSANDRA-18781)
 + * Clean up obsolete functions and simplify cql_version handling in cqlsh (CASSANDRA-18787)
 +Merged from 5.0:
+  * Fix storage_compatibility_mode for streaming (CASSANDRA-19126)
   * Add support of vector type to cqlsh COPY command (CASSANDRA-19118)
   * Make CQLSSTableWriter to support building of SAI indexes (CASSANDRA-18714)
   * Append additional JVM options when using JDK17+ (CASSANDRA-19001)
diff --cc src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
index ed92ee6a41,b3d0b52abe..5177fb09fb
--- a/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
+++ b/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
@@@ -588,6 -554,15 +580,14 @@@ public enum CassandraRelevantPropertie
      TEST_SIMULATOR_PRINT_ASM_TYPES("cassandra.test.simulator.print_asm_types", ""),
      TEST_SKIP_CRYPTO_PROVIDER_INSTALLATION("cassandra.test.security.skip.provider.installation", "false"),
      TEST_SSTABLE_FORMAT_DEVELOPMENT("cassandra.test.sstableformatdevelopment"),
+     /**
 -     * {@link StorageCompatibilityMode} mode sets how the node will behave, sstable or messaging versions to use etc.
 -     * according to a yaml setting. But many tests don't load the config hence we need to force it otherwise they would
 -     * run always under the default. Config is null for junits that don't load the config. Get from env var that
 -     * CI/build.xml sets.
++     * {@link StorageCompatibilityMode} mode sets how the node will behave, sstable or messaging versions to use etc according to a yaml setting.
++     * But many tests don't load the config hence we need to force it otherwise they would run always under the default. Config is null for junits
++     * that don't load the config. Get from env var that CI/build.xml sets.
+      *
+      * This is a dev/CI only property. Do not use otherwise.
+      */
 -    TEST_STORAGE_COMPATIBILITY_MODE("cassandra.test.storage_compatibility_mode", StorageCompatibilityMode.CASSANDRA_4.toString()),
++    TEST_STORAGE_COMPATIBILITY_MODE("cassandra.test.storage_compatibility_mode", StorageCompatibilityMode.NONE.toString()),
      TEST_STRICT_LCS_CHECKS("cassandra.test.strict_lcs_checks"),
      /** Turns some warnings into exceptions for testing. */
      TEST_STRICT_RUNTIME_CHECKS("cassandra.strict.runtime.checks"),
diff --cc src/java/org/apache/cassandra/config/Config.java
index d62d836815,9c3c941c5e..4db252917d
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@@ -1279,21 -1269,5 +1279,21 @@@ public class Confi
  
      public double severity_during_decommission = 0;
  
 +    // TODO Revisit MessagingService::current_version
-     public StorageCompatibilityMode storage_compatibility_mode = StorageCompatibilityMode.NONE;
+     public StorageCompatibilityMode storage_compatibility_mode;
 +
 +    /**
 +     * For the purposes of progress barrier we only support ALL, EACH_QUORUM, QUORUM, LOCAL_QUORUM, ANY, and ONE.
 +     *
 +     * We will still try all consistency levels above the lowest acceptable, and only fall back to it if we can not
 +     * collect enough nodes.
 +     */
 +    public volatile ConsistencyLevel progress_barrier_min_consistency_level = ConsistencyLevel.EACH_QUORUM;
 +    public volatile boolean log_out_of_token_range_requests = true;
 +    public volatile boolean reject_out_of_token_range_requests = true;
 +    public volatile ConsistencyLevel progress_barrier_default_consistency_level = ConsistencyLevel.EACH_QUORUM;
 +
 +    public volatile DurationSpec.LongMillisecondsBound progress_barrier_timeout = new DurationSpec.LongMillisecondsBound("3600000ms");
 +    public volatile DurationSpec.LongMillisecondsBound progress_barrier_backoff = new DurationSpec.LongMillisecondsBound("1000ms");
 +    public boolean unsafe_tcm_mode = false;
  }
diff --cc src/java/org/apache/cassandra/net/MessagingService.java
index 8859d1a330,903ef977b2..ceae703097
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@@ -269,11 -249,27 +268,28 @@@ public class MessagingService extends M
      public static final int VERSION_3014 = 11;
      public static final int VERSION_40 = 12;
      public static final int VERSION_50 = 13; // c14227 TTL overflow, 'uint' timestamps
 +    public static final int VERSION_51 = 14; // TCM
      public static final int minimum_version = VERSION_40;
-     public static final int current_version = Version.CURRENT.value;
-     static AcceptVersions accept_messaging = new AcceptVersions(minimum_version, current_version);
-     static AcceptVersions accept_streaming = new AcceptVersions(current_version, current_version);
 -    public static final int maximum_version = VERSION_50;
++    public static final int maximum_version = VERSION_51;
+     // we want to use a modified behavior for the tools and clients - that is, since they are not running a server, they
+     // should not need to run in a compatibility mode. They should be able to connect to the server regardless whether
+     // it uses messaving version 4 or 5
 -    public static final int current_version = DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? VERSION_40 : VERSION_50;
++    public static final int current_version = DatabaseDescriptor.getStorageCompatibilityMode().isBefore(5) ? VERSION_40 : VERSION_51;
+     static AcceptVersions accept_messaging;
+     static AcceptVersions accept_streaming;
+     static
+     {
+         if (DatabaseDescriptor.isClientInitialized())
+         {
+             accept_messaging = new AcceptVersions(minimum_version, maximum_version);
+             accept_streaming = new AcceptVersions(minimum_version, maximum_version);
+         }
+         else
+         {
+             accept_messaging = new AcceptVersions(minimum_version, current_version);
+             accept_streaming = new AcceptVersions(current_version, current_version);
+         }
+     }
      static Map<Integer, Integer> versionOrdinalMap = Arrays.stream(Version.values()).collect(Collectors.toMap(v -> v.value, v -> v.ordinal()));
  
      /**
diff --cc src/java/org/apache/cassandra/repair/messages/PrepareMessage.java
index a2951ef304,a2cd7e3903..fc44d7d0c4
--- a/src/java/org/apache/cassandra/repair/messages/PrepareMessage.java
+++ b/src/java/org/apache/cassandra/repair/messages/PrepareMessage.java
@@@ -89,7 -89,9 +89,9 @@@ public class PrepareMessage extends Rep
      }
  
      private static final String MIXED_MODE_ERROR = "Some nodes involved in repair are on an incompatible major version. " +
-                                                    "Repair is not supported in mixed major version clusters (%d vs %d).";
 -                                                   "Repair is not supported in mixed major version clusters. Note that " +
++                                                   "Repair is not supported in mixed major version clusters (%d vs %d). Note that " +
+                                                    "5.x nodes running in storage compatibility mode = 4 are considered " +
+                                                    "4.x nodes.";
  
      public static final IVersionedSerializer<PrepareMessage> serializer = new IVersionedSerializer<PrepareMessage>()
      {


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