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 769f6b3122629d8422b347d13d7f573c56173c55
Merge: 08331f4 22a4ae1
Author: Ekaterina Dimitrova <ekaterina.dimitr...@datastax.com>
AuthorDate: Fri Feb 25 11:50:44 2022 -0500

    Merge branch 'cassandra-4.0' into trunk

 NEWS.txt                                                     |  3 ++-
 doc/modules/cassandra/pages/cql/functions.adoc               | 12 ++++++++++--
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java |  7 +++++--
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --cc NEWS.txt
index e71d682,1dbc5b4..ae56953
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -395,7 -351,7 +395,8 @@@ Upgradin
  
  Deprecation
  -----------
--
++    - JavaScript user-defined functions have been deprecated. They are 
planned for removal
++      in the next major release. (CASSANDRA-17280)
      - The JMX MBean 
org.apache.cassandra.metrics:type=Streaming,name=ActiveOutboundStreams has been
        deprecated and will be removed in a subsequent major version. This 
metric was not updated since several version
        already.
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 50cda68,0bfb18e..ed2f0a1
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -749,17 -761,20 +749,20 @@@ public class DatabaseDescripto
          if (conf.allow_extra_insecure_udfs)
              logger.warn("Allowing java.lang.System.* access in UDFs is 
dangerous and not recommended. Set allow_extra_insecure_udfs: false to 
disable.");
  
 -        if(conf.enable_scripted_user_defined_functions)
++        if(conf.scripted_user_defined_functions_enabled)
+             logger.warn("JavaScript user-defined functions have been 
deprecated. You can still use them but the plan is to remove them in the next 
major version. For more information - CASSANDRA-17280");
+ 
 -        if (conf.commitlog_segment_size_in_mb <= 0)
 -            throw new ConfigurationException("commitlog_segment_size_in_mb 
must be positive, but was "
 -                    + conf.commitlog_segment_size_in_mb, false);
 -        else if (conf.commitlog_segment_size_in_mb >= 2048)
 -            throw new ConfigurationException("commitlog_segment_size_in_mb 
must be smaller than 2048, but was "
 -                    + conf.commitlog_segment_size_in_mb, false);
 +        if (conf.commitlog_segment_size.toMebibytes() == 0)
 +            throw new ConfigurationException("commitlog_segment_size must be 
positive, but was "
-                     + conf.commitlog_segment_size.toString(), false);
++                                             + 
conf.commitlog_segment_size.toString(), false);
 +        else if (conf.commitlog_segment_size.toMebibytes() >= 2048)
 +            throw new ConfigurationException("commitlog_segment_size must be 
smaller than 2048, but was "
-                     + conf.commitlog_segment_size.toString(), false);
++                                             + 
conf.commitlog_segment_size.toString(), false);
  
 -        if (conf.max_mutation_size_in_kb == null)
 -            conf.max_mutation_size_in_kb = conf.commitlog_segment_size_in_mb 
* 1024 / 2;
 -        else if (conf.commitlog_segment_size_in_mb * 1024 < 2 * 
conf.max_mutation_size_in_kb)
 -            throw new ConfigurationException("commitlog_segment_size_in_mb 
must be at least twice the size of max_mutation_size_in_kb / 1024", false);
 +        if (conf.max_mutation_size == null)
 +            conf.max_mutation_size = 
SmallestDataStorageKibibytes.inKibibytes(conf.commitlog_segment_size.toKibibytes()
 / 2);
 +        else if (conf.commitlog_segment_size.toKibibytes() < 2 * 
conf.max_mutation_size.toKibibytes())
 +            throw new ConfigurationException("commitlog_segment_size must be 
at least twice the size of max_mutation_size / 1024", false);
  
          // native transport encryption options
          if (conf.client_encryption_options != null)

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

Reply via email to