You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ed...@apache.org on 2022/02/25 17:56:50 UTC

[cassandra] branch trunk updated (769f6b3 -> 12e2c15)

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

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


    from 769f6b3  Merge branch 'cassandra-4.0' into trunk
     new 65fcc79  Revert removal of deprecated max_streaming_retries into Config, revert name change to user_defined_function_warn_timeout and user_defined_function_fail_timeout patch by Ekaterina Dimitrova; reviewed by David Capwell for CASSANDRA-17378
     new 12e2c15  Forward port from cassandra-4.0(CASSANDRA-17377) - deprecation of otc_coalescing_strategy, otc_coalescing_window_us, otc_coalescing_enough_coalesced_messages, otc_backlog_expiration_interval_ms patch by Ekaterina Dimitrova; reviewed by David Capwell for CASSANDRA-17378

The 2 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:
 NEWS.txt                                           |  3 ++
 src/java/org/apache/cassandra/config/Config.java   | 32 ++++++++++++++++++----
 .../cassandra/config/DatabaseDescriptor.java       | 21 +++++++-------
 3 files changed, 40 insertions(+), 16 deletions(-)

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


[cassandra] 01/02: Revert removal of deprecated max_streaming_retries into Config, revert name change to user_defined_function_warn_timeout and user_defined_function_fail_timeout patch by Ekaterina Dimitrova; reviewed by David Capwell for CASSANDRA-17378

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

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

commit 65fcc79b628a7e415b57c27c596ea1cb5e67211d
Author: Ekaterina Dimitrova <ek...@datastax.com>
AuthorDate: Mon Feb 14 19:12:26 2022 -0500

    Revert removal of deprecated max_streaming_retries into Config, revert name change to user_defined_function_warn_timeout and user_defined_function_fail_timeout
    patch by Ekaterina Dimitrova; reviewed by David Capwell for CASSANDRA-17378
---
 src/java/org/apache/cassandra/config/Config.java    | 18 +++++++++++++-----
 .../apache/cassandra/config/DatabaseDescriptor.java | 21 ++++++++++-----------
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java
index 8c8ab07..4a96568 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -283,6 +283,12 @@ public class Config
     public volatile int concurrent_materialized_view_builders = 1;
     public volatile int reject_repair_compaction_threshold = Integer.MAX_VALUE;
 
+    /**
+     * @deprecated retry support removed on CASSANDRA-10992
+     */
+    @Deprecated
+    public int max_streaming_retries = 3;
+
     @Replaces(oldName = "stream_throughput_outbound_megabits_per_sec", converter = Converters.MEGABITS_TO_MEBIBYTES_PER_SECOND_DATA_RATE, deprecated = true)
     public volatile DataRateSpec stream_throughput_outbound = new DataRateSpec("24MiB/s");
     @Replaces(oldName = "inter_dc_stream_throughput_outbound_megabits_per_sec", converter = Converters.MEGABITS_TO_MEBIBYTES_PER_SECOND_DATA_RATE, deprecated = true)
@@ -521,17 +527,19 @@ public class Config
      * Time in milliseconds after a warning will be emitted to the log and to the client that a UDF runs too long.
      * (Only valid, if user_defined_functions_threads_enabled==true)
      */
-    //No need of unit conversion as this parameter is not exposed in the yaml file
-    public long user_defined_function_warn_timeout_in_ms = 500;
+    //TO DO: transfer below parameter to the new config framework (DurationSpec)
+    //Below parameter is in ms
+    public long user_defined_function_warn_timeout = 500;
     /**
      * Time in milliseconds after a fatal UDF run-time situation is detected and action according to
      * user_function_timeout_policy will take place.
      * (Only valid, if user_defined_functions_threads_enabled==true)
      */
-    //No need of unit conversion as this parameter is not exposed in the yaml file
-    public long user_defined_function_fail_timeout_in_ms = 1500;
+    //TO DO: transfer below parameter to the new config framework (DurationSpec)
+    //Below parameter is in ms
+    public long user_defined_function_fail_timeout = 1500;
     /**
-     * Defines what to do when a UDF ran longer than user_defined_function_fail_timeout_in_ms.
+     * Defines what to do when a UDF ran longer than user_defined_function_fail_timeout.
      * Possible options are:
      * - 'die' - i.e. it is able to emit a warning to the client before the Cassandra Daemon will shut down.
      * - 'die_immediate' - shut down C* daemon immediately (effectively prevent the chance that the client will receive a warning).
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index ed2f0a1..ced4ad3 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -75,7 +75,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.cassandra.config.CassandraRelevantProperties.OS_ARCH;
 import static org.apache.cassandra.config.CassandraRelevantProperties.SUN_ARCH_DATA_MODEL;
 import static org.apache.cassandra.io.util.FileUtils.ONE_GIB;
@@ -735,13 +734,13 @@ public class DatabaseDescriptor
             throw new ConfigurationException("index_summary_capacity option was set incorrectly to '"
                                              + conf.index_summary_capacity.toString() + "', it should be a non-negative integer.", false);
 
-        if (conf.user_defined_function_fail_timeout_in_ms < 0)
-            throw new ConfigurationException("user_defined_function_fail_timeout_in_ms must not be negative", false);
-        if (conf.user_defined_function_warn_timeout_in_ms < 0)
-            throw new ConfigurationException("user_defined_function_warn_timeout_in_ms must not be negative", false);
+        if (conf.user_defined_function_fail_timeout < 0)
+            throw new ConfigurationException("user_defined_function_fail_timeout must not be negative", false);
+        if (conf.user_defined_function_warn_timeout < 0)
+            throw new ConfigurationException("user_defined_function_warn_timeout must not be negative", false);
 
-        if (conf.user_defined_function_fail_timeout_in_ms < conf.user_defined_function_warn_timeout_in_ms)
-            throw new ConfigurationException("user_defined_function_warn_timeout_in_ms must less than user_defined_function_fail_timeout_in_ms", false);
+        if (conf.user_defined_function_fail_timeout < conf.user_defined_function_warn_timeout)
+            throw new ConfigurationException("user_defined_function_warn_timeout must less than user_defined_function_fail_timeout", false);
 
         if (!conf.allow_insecure_udfs && !conf.user_defined_functions_threads_enabled)
             throw new ConfigurationException("To be able to set enable_user_defined_functions_threads: false you need to set allow_insecure_udfs: true - this is an unsafe configuration and is not recommended.");
@@ -3130,12 +3129,12 @@ public class DatabaseDescriptor
 
     public static long getUserDefinedFunctionWarnTimeout()
     {
-        return conf.user_defined_function_warn_timeout_in_ms;
+        return conf.user_defined_function_warn_timeout;
     }
 
     public static void setUserDefinedFunctionWarnTimeout(long userDefinedFunctionWarnTimeout)
     {
-        conf.user_defined_function_warn_timeout_in_ms = userDefinedFunctionWarnTimeout;
+        conf.user_defined_function_warn_timeout = userDefinedFunctionWarnTimeout;
     }
 
     public static boolean allowInsecureUDFs()
@@ -3191,12 +3190,12 @@ public class DatabaseDescriptor
 
     public static long getUserDefinedFunctionFailTimeout()
     {
-        return conf.user_defined_function_fail_timeout_in_ms;
+        return conf.user_defined_function_fail_timeout;
     }
 
     public static void setUserDefinedFunctionFailTimeout(long userDefinedFunctionFailTimeout)
     {
-        conf.user_defined_function_fail_timeout_in_ms = userDefinedFunctionFailTimeout;
+        conf.user_defined_function_fail_timeout = userDefinedFunctionFailTimeout;
     }
 
     public static Config.UserFunctionTimeoutPolicy getUserFunctionTimeoutPolicy()

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


[cassandra] 02/02: Forward port from cassandra-4.0(CASSANDRA-17377) - deprecation of otc_coalescing_strategy, otc_coalescing_window_us, otc_coalescing_enough_coalesced_messages, otc_backlog_expiration_interval_ms patch by Ekaterina Dimitrova; reviewed by David Capwell for CASSANDRA-17378

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

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

commit 12e2c159f86b223df1c2018c8a395a805b11956e
Author: Ekaterina Dimitrova <ek...@datastax.com>
AuthorDate: Fri Feb 11 19:09:30 2022 -0500

    Forward port from cassandra-4.0(CASSANDRA-17377) - deprecation of otc_coalescing_strategy, otc_coalescing_window_us, otc_coalescing_enough_coalesced_messages, otc_backlog_expiration_interval_ms
    patch by Ekaterina Dimitrova; reviewed by David Capwell for CASSANDRA-17378
---
 NEWS.txt                                         |  3 +++
 src/java/org/apache/cassandra/config/Config.java | 14 ++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/NEWS.txt b/NEWS.txt
index ae56953..f9626f1 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -225,6 +225,9 @@ New features
 
 Upgrading
 ---------
+    - otc_coalescing_strategy, otc_coalescing_window_us, otc_coalescing_enough_coalesced_messages,
+      otc_backlog_expiration_interval_ms are deprecated and will be removed at earliest with next major release.
+      otc_coalescing_strategy is disabled since 3.11.
     - As part of the Internode Messaging improvement work in CASSANDRA-15066, internode_send_buff_size_in_bytes and
       internode_recv_buff_size_in_bytes were renamed to internode_socket_send_buffer_size_in_bytes and
       internode_socket_receive_buffer_size_in_bytes. To support upgrades pre-4.0, we add backward compatibility and
diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java
index 4a96568..910a3e8 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -471,6 +471,20 @@ public class Config
      */
     public volatile ConsistencyLevel ideal_consistency_level = null;
 
+    @Deprecated
+    public String otc_coalescing_strategy = "DISABLED";
+
+    @Deprecated
+    public static final int otc_coalescing_window_us_default = 200;
+    @Deprecated
+    public int otc_coalescing_window_us = otc_coalescing_window_us_default;
+    @Deprecated
+    public int otc_coalescing_enough_coalesced_messages = 8;
+    @Deprecated
+    public static final int otc_backlog_expiration_interval_ms_default = 200;
+    @Deprecated
+    public volatile int otc_backlog_expiration_interval_ms = otc_backlog_expiration_interval_ms_default;
+
     /**
      * Size of the CQL prepared statements cache in MiB.
      * Defaults to 1/256th of the heap size or 10MiB, whichever is greater.

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