(cassandra-dtest) branch trunk updated: Align tests with CASSANDRA-19341

2024-05-06 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 6dd7def9 Align tests with CASSANDRA-19341
6dd7def9 is described below

commit 6dd7def99467952d1df6a451d2e74861cf6599de
Author: Benjamin Lerer 
AuthorDate: Thu Mar 21 17:19:58 2024 +0100

Align tests with CASSANDRA-19341

patch by Benjamin Lerer; review by Berenguer Blasi, Caleb Rackliffe and 
Ekaterina Dimitrova for CASSANDRA-19341
---
 cql_test.py  | 23 ---
 json_test.py |  4 +---
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/cql_test.py b/cql_test.py
index 99d3088c..30c5507d 100644
--- a/cql_test.py
+++ b/cql_test.py
@@ -1219,14 +1219,23 @@ class TestCQLSlowQuery(CQLTester):
 TestCQLSlowQuery._assert_logs(node, session, table,
   query="SELECT * FROM {} WHERE k >= 0 AND 
k < 100 ALLOW FILTERING",
   logged_query="SELECT \* FROM ks.{} WHERE 
k >= 0 AND k < 100")
-TestCQLSlowQuery._assert_logs(node, session, table,
-  query="SELECT * FROM {} WHERE k <= 100 
AND k > 0 ALLOW FILTERING",
-  logged_query="SELECT \* FROM ks.{} WHERE 
k > 0 AND k <= 100")
-TestCQLSlowQuery._assert_logs(node, session, table,
-  query="SELECT * FROM {} WHERE k < 100 
AND k >= 0 ALLOW FILTERING",
-  logged_query="SELECT \* FROM ks.{} WHERE 
k >= 0 AND k < 100")
 
-# test logging of slow queries with restriciton on regular column
+if node.cluster.version() >= '5.1':
+TestCQLSlowQuery._assert_logs(node, session, table,
+  query="SELECT * FROM {} WHERE k <= 
100 AND k > 0 ALLOW FILTERING",
+  logged_query="SELECT \* FROM ks.{} 
WHERE k <= 100 AND k > 0")
+TestCQLSlowQuery._assert_logs(node, session, table,
+  query="SELECT * FROM {} WHERE k < 
100 AND k >= 0 ALLOW FILTERING",
+  logged_query="SELECT \* FROM ks.{} 
WHERE k < 100 AND k >= 0")
+else:
+TestCQLSlowQuery._assert_logs(node, session, table,
+  query="SELECT * FROM {} WHERE k <= 
100 AND k > 0 ALLOW FILTERING",
+  logged_query="SELECT \* FROM ks.{} 
WHERE k > 0 AND k <= 100")
+TestCQLSlowQuery._assert_logs(node, session, table,
+  query="SELECT * FROM {} WHERE k < 
100 AND k >= 0 ALLOW FILTERING",
+  logged_query="SELECT \* FROM ks.{} 
WHERE k >= 0 AND k < 100")
+
+# test logging of slow queries with restriction on regular column
 TestCQLSlowQuery._assert_logs(node, session, table,
   query="SELECT * FROM {} WHERE v = 1 
ALLOW FILTERING",
   logged_query="SELECT \* FROM ks.{} WHERE 
v = 1")
diff --git a/json_test.py b/json_test.py
index 4f2e32b5..94c09f55 100644
--- a/json_test.py
+++ b/json_test.py
@@ -1238,10 +1238,10 @@ class TestJsonFullRowInsertSelect(Tester):
 """
 run_func_docstring(tester=self, test_func=self.test_simple_schema)
 
+@since("2.0", max_version="5.0")
 def test_pkey_requirement(self):
 """
 Create schema:
-
 >>> cqlsh('''
 ... CREATE TABLE primitive_type_test (
 ...   key1 text PRIMARY KEY,
@@ -1261,9 +1261,7 @@ class TestJsonFullRowInsertSelect(Tester):
 ...   col14 varint,
 ...   col15 boolean)
 ... ''')
-
 Try to create a JSON row with the pkey omitted from the column list, 
and omitted from the JSON data:
-
 >>> cqlsh_err_print('''INSERT INTO primitive_type_test JSON 
'{"col1": "bar"}' ''')
 :2:InvalidRequest: Error from server: code=2200 [Invalid 
query] message="Invalid null value in condition for column key1"
 


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



[cassandra] 02/02: add javadoc

2023-10-24 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a commit to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 821916e60448561c0266e89900b12159e63fd267
Author: Benjamin Lerer 
AuthorDate: Tue Oct 24 15:46:39 2023 +0200

add javadoc
---
 .../cassandra/schema/DistributedMetadataLogKeyspace.java|  1 -
 src/java/org/apache/cassandra/tcm/Commit.java   | 13 +
 src/java/org/apache/cassandra/tcm/Startup.java  |  6 --
 src/java/org/apache/cassandra/tcm/log/Entry.java|  9 +
 4 files changed, 26 insertions(+), 3 deletions(-)

diff --git 
a/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java 
b/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java
index 74b0e4bb73..de57f563b8 100644
--- a/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java
+++ b/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.nio.ByteBuffer;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSortedSet;
 import org.slf4j.Logger;
diff --git a/src/java/org/apache/cassandra/tcm/Commit.java 
b/src/java/org/apache/cassandra/tcm/Commit.java
index 76e2cb3390..2e7fbda8d1 100644
--- a/src/java/org/apache/cassandra/tcm/Commit.java
+++ b/src/java/org/apache/cassandra/tcm/Commit.java
@@ -45,6 +45,10 @@ import org.apache.cassandra.utils.vint.VIntCoding;
 
 import static org.apache.cassandra.tcm.ClusterMetadataService.State.*;
 
+/**
+ * Commit request send by a {@code RemoteProcessor} from a non-CMS node.
+ *
+ */
 public class Commit
 {
 private static final Logger logger = LoggerFactory.getLogger(Commit.class);
@@ -300,6 +304,10 @@ public class Commit
 return new Handler(processor, replicator, messagingService, () -> 
LOCAL);
 }
 
+/**
+ * Handler in charge of performing the commit to the distributed log. If 
the node is not a CMS member the query
+ * will be rejected with a {@code NotCMSException}.
+ */
 static class Handler implements IVerbHandler
 {
 private final Processor processor;
@@ -342,6 +350,11 @@ public class Commit
 }
 }
 
+/**
+ * Checks that the node is part of the CMS.
+ * @throws NotCMSException if the node is not member of the CMS.
+ * @throws IllegalStateException if the state is an unexpected one.
+ */
 private void checkCMSState()
 {
 switch (cmsStateSupplier.get())
diff --git a/src/java/org/apache/cassandra/tcm/Startup.java 
b/src/java/org/apache/cassandra/tcm/Startup.java
index b341eafd05..cd2bac48bb 100644
--- a/src/java/org/apache/cassandra/tcm/Startup.java
+++ b/src/java/org/apache/cassandra/tcm/Startup.java
@@ -85,6 +85,8 @@ public class Startup
 initMessaging.run();
 break;
 case VOTE:
+// Usual case. The node will initialize itself as a non-CMS 
node and will attempt to discover an existing CMS service or,
+// failing that, will participate in a vote to establish a new 
one with other discovered participants.
 logger.info("Initializing for discovery");
 initializeAsNonCmsNode(wrapProcessor);
 initializeForDiscovery(initMessaging);
@@ -300,7 +302,7 @@ public class Startup
 /**
  * Whether this node becomes a member of CMS or not is determined by 
the election procedure (see {@link Election}).
  * This startup mode is selected when the node was not started before, 
and it does not satisfy the conditions
- * for {@link #FIRST_CMS}.
+ * for {@link #FIRST_CMS}. {@code VOTE} is usually the default startup 
mode.
  */
 VOTE,
 
@@ -314,7 +316,7 @@ public class Startup
 
 /**
  * The node will use the existing {@code ClusterMetadata} provided 
through a file - it happens when
- * {@link 
CassandraRelevantProperties.TCM_UNSAFE_BOOT_WITH_CLUSTERMETADATA} is set.
+ * {@link 
CassandraRelevantProperties#TCM_UNSAFE_BOOT_WITH_CLUSTERMETADATA} is set.
  */
 BOOT_WITH_CLUSTERMETADATA;
 
diff --git a/src/java/org/apache/cassandra/tcm/log/Entry.java 
b/src/java/org/apache/cassandra/tcm/log/Entry.java
index 588480132a..a5186a6dbe 100644
--- a/src/java/org/apache/cassandra/tcm/log/Entry.java
+++ b/src/java/org/apache/cassandra/tcm/log/Entry.java
@@ -178,9 +178,17 @@ public class Entry implements Comparable
 }
 }
 
+/**
+ * {@code Entry.ID} supplier that generate IDs from the node address 
(encoded on the 4 most significant bytes) and
+ * from a counter initialized from the clock current time in millis and 
incremented on req

[cassandra] 01/02: Use pinned Harry version

2023-10-24 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a commit to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 2d767aad7f2482d1752420356bd4eac6404f3e79
Author: Alex Petrov 
AuthorDate: Thu Oct 19 14:47:29 2023 +0200

Use pinned Harry version
---
 .build/build-resolver.xml |   4 
 .build/parent-pom-template.xml|   5 +++--
 lib/harry-0.0.2-internal-20221121.14211-2.jar | Bin 435204 -> 0 bytes
 lib/harry-core-0.0.2-CASSANDRA-18768.jar  | Bin 0 -> 458194 bytes
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.build/build-resolver.xml b/.build/build-resolver.xml
index b5509da443..889dc11bde 100644
--- a/.build/build-resolver.xml
+++ b/.build/build-resolver.xml
@@ -267,6 +267,10 @@
 
 
 
+
+
+
+   
 
 
 
diff --git a/.build/parent-pom-template.xml b/.build/parent-pom-template.xml
index 49878c3a42..eb9c86e65f 100644
--- a/.build/parent-pom-template.xml
+++ b/.build/parent-pom-template.xml
@@ -522,8 +522,9 @@
   
 org.apache.cassandra
 harry-core
-0.0.2-SNAPSHOT
-test
+harry-core-0.0.2-CASSANDRA-18768
+system
+
${test.lib}/harry-core-0.0.2-CASSANDRA-18768.jar
   
   
 org.reflections
diff --git a/lib/harry-0.0.2-internal-20221121.14211-2.jar 
b/lib/harry-0.0.2-internal-20221121.14211-2.jar
deleted file mode 100644
index 44bf1be4a3..00
Binary files a/lib/harry-0.0.2-internal-20221121.14211-2.jar and /dev/null 
differ
diff --git a/lib/harry-core-0.0.2-CASSANDRA-18768.jar 
b/lib/harry-core-0.0.2-CASSANDRA-18768.jar
new file mode 100644
index 00..292db01f06
Binary files /dev/null and b/lib/harry-core-0.0.2-CASSANDRA-18768.jar differ


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



[cassandra] branch cep-21-tcm-review updated (4e23ee87ad -> 821916e604)

2023-10-24 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 4e23ee87ad Guaranty the ordering of entries within Replication 
instances
 new 2d767aad7f Use pinned Harry version
 new 821916e604 add javadoc

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:
 .build/build-resolver.xml  |   4 
 .build/parent-pom-template.xml |   5 +++--
 lib/harry-0.0.2-internal-20221121.14211-2.jar  | Bin 435204 -> 0 bytes
 lib/harry-core-0.0.2-CASSANDRA-18768.jar   | Bin 0 -> 458194 bytes
 .../schema/DistributedMetadataLogKeyspace.java |   1 -
 src/java/org/apache/cassandra/tcm/Commit.java  |  13 +
 src/java/org/apache/cassandra/tcm/Startup.java |   6 --
 src/java/org/apache/cassandra/tcm/log/Entry.java   |   9 +
 8 files changed, 33 insertions(+), 5 deletions(-)
 delete mode 100644 lib/harry-0.0.2-internal-20221121.14211-2.jar
 create mode 100644 lib/harry-core-0.0.2-CASSANDRA-18768.jar


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



[cassandra] branch cep-21-tcm-review updated (064f07b13d -> 4e23ee87ad)

2023-10-19 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 064f07b13d JAVADOC: Startup and Discovery
 add 6d1a20f91a Add implementation overview doc
 add 4e23ee87ad Guaranty the ordering of entries within Replication 
instances

No new revisions were added by this update.

Summary of changes:
 .../schema/DistributedMetadataLogKeyspace.java |  3 +-
 .../org/apache/cassandra/tcm/TCM_implementation.md | 57 ++
 .../org/apache/cassandra/tcm/log/Replication.java  | 39 +--
 .../cassandra/tcm/log/SystemKeyspaceStorage.java   |  4 +-
 .../test/log/SystemKeyspaceStorageTest.java|  9 ++--
 .../apache/cassandra/tcm/log/LogStateTestBase.java | 10 ++--
 6 files changed, 84 insertions(+), 38 deletions(-)
 create mode 100644 src/java/org/apache/cassandra/tcm/TCM_implementation.md


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



[cassandra] branch cep-21-tcm-review updated: Fix ClusterMetadataService.state javadoc

2023-10-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a commit to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-21-tcm-review by this push:
 new fbe391130a Fix ClusterMetadataService.state javadoc
fbe391130a is described below

commit fbe391130aa0946d7d8389e957e96520c6638842
Author: Benjamin Lerer 
AuthorDate: Wed Oct 18 11:57:09 2023 +0200

Fix ClusterMetadataService.state javadoc
---
 .../cassandra/tcm/ClusterMetadataService.java  | 37 --
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/src/java/org/apache/cassandra/tcm/ClusterMetadataService.java 
b/src/java/org/apache/cassandra/tcm/ClusterMetadataService.java
index d01c63b419..3b7afc273b 100644
--- a/src/java/org/apache/cassandra/tcm/ClusterMetadataService.java
+++ b/src/java/org/apache/cassandra/tcm/ClusterMetadataService.java
@@ -137,8 +137,15 @@ public class ClusterMetadataService
 private final AtomicBoolean commitsPaused = new AtomicBoolean();
 
 /**
- * Returns the state of the {@code ClusteMetadataService}.
- * @return the state of the {@code ClusteMetadataService}.
+ * Returns the current state of the {@code ClusteMetadataService}.
+ * 
+ *  The state can be:
+ *  
+ * LOCAL: the node is a member of CMS
+ * REMOTE: the node is not a CMS nember
+ * GOSSIP: the node has not been upgraded to TCM yet
+ * RESET: the node is being forced to reset the local metadata
+ *   
  */
 public static State state()
 {
@@ -860,8 +867,32 @@ public class ClusterMetadataService
 }
 }
 
+/**
+ *  A state of the {@code ClusterMetadataService} of the node. A state can 
be:
+ *  
+ *  the node is a member of CMS
+ *  the node is not a CMS nember
+ *  the node has not been upgraded to TCM yet
+ *  the node is being forced to reset the local metadata
+ *  
+ */
 public enum State
 {
-LOCAL, REMOTE, GOSSIP, RESET
+/**
+ * The node is a member of the CMS
+ */
+LOCAL,
+/**
+ * The node is not a member of the CMS
+ */
+REMOTE,
+/**
+ * The node has not been upgraded to TCM yet
+ */
+GOSSIP,
+/**
+ * The node is being forced to reset the local metadata
+ */
+RESET
 }
 }
\ No newline at end of file


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



[cassandra] 01/02: Add javadoc WIP

2023-10-17 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a commit to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 73c7ca4a5f90cec5297c3983752506646645146a
Author: Benjamin Lerer 
AuthorDate: Thu Oct 5 16:41:48 2023 +0200

Add javadoc WIP
---
 .../config/CassandraRelevantProperties.java|  3 +-
 src/java/org/apache/cassandra/config/Config.java   |  7 +-
 .../cassandra/config/DatabaseDescriptor.java   |  6 ++
 .../cql3/statements/DescribeStatement.java |  6 ++
 .../org/apache/cassandra/db/SystemKeyspace.java| 24 ++
 .../apache/cassandra/schema/DistributedSchema.java |  4 +
 src/java/org/apache/cassandra/schema/Schema.java   |  7 ++
 .../cassandra/schema/SchemaTransformation.java |  2 +-
 .../org/apache/cassandra/tcm/ClusterMetadata.java  | 25 ++
 .../cassandra/tcm/ClusterMetadataService.java  | 22 --
 src/java/org/apache/cassandra/tcm/Discovery.java   | 22 +-
 src/java/org/apache/cassandra/tcm/Epoch.java   | 92 +-
 .../apache/cassandra/tcm/MetadataSnapshots.java| 56 +
 .../org/apache/cassandra/tcm/MetadataValue.java| 14 
 src/java/org/apache/cassandra/tcm/Period.java  |  4 +
 .../cassandra/tcm/RecentlySealedPeriods.java   |  8 +-
 src/java/org/apache/cassandra/tcm/Retry.java   | 79 +++
 src/java/org/apache/cassandra/tcm/Sealed.java  | 27 +++
 src/java/org/apache/cassandra/tcm/Startup.java | 19 +
 .../org/apache/cassandra/tcm/Transformation.java   | 34 
 .../cassandra/tcm/listeners/ChangeListener.java|  4 +-
 .../tcm/listeners/MetadataSnapshotListener.java|  7 ++
 src/java/org/apache/cassandra/tcm/log/Entry.java   | 17 
 .../org/apache/cassandra/tcm/log/LocalLog.java | 31 +++-
 .../org/apache/cassandra/tcm/log/LogState.java | 11 +++
 .../org/apache/cassandra/tcm/log/LogStorage.java   |  8 ++
 .../org/apache/cassandra/tcm/log/Replication.java  | 22 +-
 .../cassandra/tcm/log/SystemKeyspaceStorage.java   | 12 ++-
 .../apache/cassandra/tcm/migration/Election.java   | 11 +++
 .../tcm/ownership/UniformRangePlacement.java   |  6 +-
 .../cassandra/tcm/transformations/SealPeriod.java  |  2 +-
 31 files changed, 531 insertions(+), 61 deletions(-)

diff --git 
a/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java 
b/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
index 32c5d4fb59..554e407bbf 100644
--- a/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
+++ b/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
@@ -511,8 +511,9 @@ public enum CassandraRelevantProperties
  */
 
TCM_PROGRESS_BARRIER_BACKOFF_MILLIS("cassandra.progress_barrier_backoff_ms", 
"1000"),
 
TCM_PROGRESS_BARRIER_TIMEOUT_MILLIS("cassandra.progress_barrier_timeout_ms", 
"360"),
+
 /**
- * size of in-memory index of max epoch -> sealed period
+ * Maximum sized of the {@code RecentlySealedPeriods} in-memory index.
  */
 
TCM_RECENTLY_SEALED_PERIOD_INDEX_SIZE("cassandra.recently_sealed_period_index_size",
 "10"),
 
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index 01f9be8c15..927e830ce1 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -174,8 +174,13 @@ public class Config
 public volatile DurationSpec.LongMillisecondsBound cms_await_timeout = new 
DurationSpec.LongMillisecondsBound("12ms");
 public volatile int cms_default_max_retries = 10;
 public volatile DurationSpec.IntMillisecondsBound 
cms_default_retry_backoff = new DurationSpec.IntMillisecondsBound("50ms");
+
 /**
- * How often we should snapshot the cluster metadata.
+ * Specify how often a snapshot of the cluster metadata must be taken.
+ * The frequency is express in epochs. A frequency of 100, for example, 
means that a snapshot will be taken every time
+ * the epoch is a multiple of 100.
+ * Taking a snapshot will also seal a period (e.g. cluster metadata 
partition). Therefore the snapshot frequency also determine the size of the
+ * {@code system.local_metadata_log} and {@code 
cluster_metadata.distributed_metadata_log} tables partitions.
  */
 public volatile int metadata_snapshot_frequency = 100;
 
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index f22f845b38..365dd255d6 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -4985,6 +4985,12 @@ public class DatabaseDescriptor
 return conf.cms_await_timeout;
 }
 
+/**
+ * Returns how often a snapsho

[cassandra] branch cep-21-tcm-review created (now 509d33155f)

2023-10-17 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git


  at 509d33155f Simplify the RecentlySealedPeriod logic

This branch includes the following new commits:

 new 73c7ca4a5f Add javadoc WIP
 new 509d33155f Simplify the RecentlySealedPeriod logic

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.



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



[cassandra] 02/02: Simplify the RecentlySealedPeriod logic

2023-10-17 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a commit to branch cep-21-tcm-review
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 509d33155f9e222a086b3d61c969208dad6fe722
Author: Benjamin Lerer 
AuthorDate: Tue Oct 17 13:10:15 2023 +0200

Simplify the RecentlySealedPeriod logic
---
 .../cassandra/tcm/RecentlySealedPeriods.java   | 92 +-
 src/java/org/apache/cassandra/tcm/Sealed.java  |  2 +-
 .../cassandra/tcm/RecentlySealedPeriodsTest.java   | 18 +++--
 3 files changed, 48 insertions(+), 64 deletions(-)

diff --git a/src/java/org/apache/cassandra/tcm/RecentlySealedPeriods.java 
b/src/java/org/apache/cassandra/tcm/RecentlySealedPeriods.java
index cc16ae656e..cca1d7a213 100644
--- a/src/java/org/apache/cassandra/tcm/RecentlySealedPeriods.java
+++ b/src/java/org/apache/cassandra/tcm/RecentlySealedPeriods.java
@@ -18,11 +18,12 @@
 
 package org.apache.cassandra.tcm;
 
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
+import java.util.Map;
+import java.util.NavigableMap;
 
 import com.google.common.annotations.VisibleForTesting;
+import com.google.common.collect.ImmutableSortedMap;
 
 import org.apache.cassandra.config.CassandraRelevantProperties;
 
@@ -34,50 +35,40 @@ import 
org.apache.cassandra.config.CassandraRelevantProperties;
  * the target is outside the range of this index, we eventually fall back to a 
read
  * from the system.metadata_sealed_periods table.
  */
-public class RecentlySealedPeriods
+public final class RecentlySealedPeriods
 {
-public static final RecentlySealedPeriods EMPTY = new 
RecentlySealedPeriods(new Sealed[0]);
+public static final RecentlySealedPeriods EMPTY = new 
RecentlySealedPeriods(ImmutableSortedMap.of());
 
 /**
  * The maximum number of sealed periods stored in memory.
  */
-private int maxSize = 
CassandraRelevantProperties.TCM_RECENTLY_SEALED_PERIOD_INDEX_SIZE.getInt();
-private Sealed[] recent;
+private final int maxSize = 
CassandraRelevantProperties.TCM_RECENTLY_SEALED_PERIOD_INDEX_SIZE.getInt();
+private final NavigableMap recent;
 
-private RecentlySealedPeriods(Sealed first)
-{
-this.recent = new Sealed[]{first};
-}
-
-private RecentlySealedPeriods(Sealed[] recent)
+private RecentlySealedPeriods(ImmutableSortedMap recent)
 {
 this.recent = recent;
 }
 
 public static RecentlySealedPeriods init(List recent)
 {
-Collections.sort(recent);
-return new RecentlySealedPeriods(recent.toArray(new 
Sealed[recent.size()]));
+ImmutableSortedMap.Builder builder = 
ImmutableSortedMap.naturalOrder();
+for (Sealed sealed: recent)
+{
+builder.put(sealed.epoch, sealed);
+}
+return new RecentlySealedPeriods(builder.build());
 }
 
-
 public RecentlySealedPeriods with(Epoch epoch, long period)
 {
-if (recent == null)
-{
-return new RecentlySealedPeriods(new Sealed(period, epoch));
-}
-else
-{
-int toCopy = Math.min(recent.length, maxSize - 1);
-int newSize = Math.min(recent.length + 1, maxSize);
-Sealed[] newList = new Sealed[newSize];
-System.arraycopy(recent, recent.length - toCopy, newList, 0, 
toCopy);
-newList[newSize - 1] = new Sealed(period, epoch);
-// shouldn't be necessary, but is cheap
-Arrays.sort(newList, Sealed::compareTo);
-return new RecentlySealedPeriods(newList);
-}
+NavigableMap toKeep = recent.size() < maxSize ? recent
+ : 
recent.tailMap(recent.firstKey(), false);
+
+return new RecentlySealedPeriods(ImmutableSortedMap.naturalOrder()
+   .putAll(toKeep)
+   .put(epoch, new 
Sealed(period, epoch))
+   .build());
 }
 
 /**
@@ -86,28 +77,27 @@ public class RecentlySealedPeriods
  * as long as its epoch is greater than the target.
  * If the target epoch is greater than the max epoch in the latest sealed
  * period, then assume there is no suitable snapshot.
- * @param epoch
+ * @param epoch the target epoch
  * @return
  */
 public Sealed lookupEpochForSnapshot(Epoch epoch)
 {
+if (recent.isEmpty())
+return Sealed.EMPTY;
+
 // if the target is > the highest indexed value there's no need to
 // scan the index. Instead, just signal to the caller that no suitable
 // sealed period was found.
-if (recent.length > 0)
-{
-Sealed latest = recent[recent.length - 1];
-return latest.epoch.isAfter(epoch) ? latest : Sealed.EMPTY;
-}
- 

[cassandra] branch trunk updated: Add Mathematical Functions

2022-11-22 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 88dc64d208 Add Mathematical Functions
88dc64d208 is described below

commit 88dc64d2086c9a91f00ee024b8ef13cb2c193ee6
Author: XV4DE 
AuthorDate: Sat May 14 12:28:40 2022 -0700

Add Mathematical Functions

Patch by Simon Chess; review by Benjamin Lerer Ekaterina Dimitrova for 
CASSANDRA-17221

This patch add the abs, exp, log, log10, and round functions for the 
numeric types.
---
 .build/cassandra-deps-template.xml |   4 +
 .build/parent-pom-template.xml |   5 +
 CHANGES.txt|   1 +
 NEWS.txt   |   1 +
 doc/modules/cassandra/pages/cql/functions.adoc |  20 ++
 .../apache/cassandra/cql3/functions/MathFcts.java  | 134 +
 .../cassandra/cql3/functions/NativeFunctions.java  |   1 +
 .../org/apache/cassandra/db/marshal/ByteType.java  |  30 ++
 .../cassandra/db/marshal/CounterColumnType.java|  30 ++
 .../apache/cassandra/db/marshal/DecimalType.java   |  59 
 .../apache/cassandra/db/marshal/DoubleType.java|  30 ++
 .../org/apache/cassandra/db/marshal/FloatType.java |  30 ++
 .../org/apache/cassandra/db/marshal/Int32Type.java |  30 ++
 .../apache/cassandra/db/marshal/IntegerType.java   |  44 +++
 .../org/apache/cassandra/db/marshal/LongType.java  |  30 ++
 .../apache/cassandra/db/marshal/NumberType.java|  49 +++
 .../org/apache/cassandra/db/marshal/ShortType.java |  30 ++
 .../cassandra/cql3/functions/MathFctsTest.java | 331 +
 18 files changed, 859 insertions(+)

diff --git a/.build/cassandra-deps-template.xml 
b/.build/cassandra-deps-template.xml
index 96c6c5379b..44f9f35ab3 100644
--- a/.build/cassandra-deps-template.xml
+++ b/.build/cassandra-deps-template.xml
@@ -340,6 +340,10 @@
   com.github.seancfoley
   ipaddress
 
+
+  ch.obermuhlner
+  big-math
+
 
   org.agrona
   agrona
diff --git a/.build/parent-pom-template.xml b/.build/parent-pom-template.xml
index a76c46bc72..752645599d 100644
--- a/.build/parent-pom-template.xml
+++ b/.build/parent-pom-template.xml
@@ -1029,6 +1029,11 @@
 agrona
 1.17.1
   
+  
+ch.obermuhlner
+big-math
+2.3.0
+  
 
   
 
diff --git a/CHANGES.txt b/CHANGES.txt
index 39363ac4c4..d64521fdea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.2
+ * Add Mathematical functions (CASSANDRA-17221)
  * Make incremental backup configurable per table (CASSANDRA-15402)
  * Change shebangs of Python scripts to resolve Python 3 from env command 
(CASSANDRA-17832)
  * Add reasons to guardrail messages and consider guardrails in the error 
message for needed ALLOW FILTERING (CASSANDRA-17967)
diff --git a/NEWS.txt b/NEWS.txt
index bc94c640c0..2238c43f36 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -57,6 +57,7 @@ using the provided 'sstableupgrade' tool.
 
 New features
 
+- Added new Mathematical CQL functions: abs, exp, log, log10 and round.
 - Adds a trie-based memtable implementation, which improves memory use, 
garbage collection efficiency and lookup
   performance. The new memtable is implemented by the TrieMemtable class 
and can be selected using the memtable
   API, see src/java/org/apache/cassandra/db/memtable/Memtable_API.md.
diff --git a/doc/modules/cassandra/pages/cql/functions.adoc 
b/doc/modules/cassandra/pages/cql/functions.adoc
index 93439a322e..39fc9860a4 100644
--- a/doc/modules/cassandra/pages/cql/functions.adoc
+++ b/doc/modules/cassandra/pages/cql/functions.adoc
@@ -238,6 +238,26 @@ For every xref:cql/types.adoc#native-types[type] supported 
by CQL, the function
 Conversely, the function `blobAsType` takes a 64-bit `blob` argument and 
converts it to a `bigint` value. 
 For example, `bigintAsBlob(3)` returns `0x0003` and 
`blobAsBigint(0x0003)` returns `3`.
 
+ Math Functions
+
+Cql provides the following math functions: `abs`, `exp`, `log`, `log10`, and 
`round`.
+The return type for these functions is always the same as the input type.
+
+[cols=",",options="header",]
+|===
+|Function name |Description
+
+|`abs` | Returns the absolute value of the input.
+
+|`exp` | Returns the number e to the power of the input.
+
+|`log` | Returns the natural log of the input.
+
+|`log10` | Returns the log base 10 of the input.
+
+|`round` | Rounds the input to the nearest whole number using rounding mode 
`HALF_UP`.
+|===
+
 [[user-defined-scalar-functions]]
  User-defined functions
 
diff --git a/src/java/org/apache/cassandra/cql3/functions/MathFcts.java 
b/src/java/org/apache/cassandra/cql3/functions/MathFcts.java
new file mode 100644
index 00..553ac40fe0
--- /dev/nul

[cassandra] 01/01: Merge branch cassandra-4.1 into trunk

2022-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 35578a4a9f6a5614a388939354fe68d03dc20459
Merge: 872e34c2d6 00ad7f2ed9
Author: Benjamin Lerer 
AuthorDate: Wed Sep 28 15:57:25 2022 +0200

Merge branch cassandra-4.1 into trunk

 doc/cql3/CQL.textile | 218 ++-
 1 file changed, 181 insertions(+), 37 deletions(-)



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



[cassandra] branch cassandra-3.11 updated (70b0673d85 -> 0894fd97a2)

2022-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 70b0673d85 Supress CVE-2022-25857 et al for snakeyaml
 add 0894fd97a2 Adds missing changes to CQL.textile

No new revisions were added by this update.

Summary of changes:
 doc/cql3/CQL.textile | 62 ++--
 1 file changed, 55 insertions(+), 7 deletions(-)


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



[cassandra] branch cassandra-4.1 updated (5d9d93ea08 -> 00ad7f2ed9)

2022-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 5d9d93ea08 Prepare debian changelog for 4.1-beta1
 add 0894fd97a2 Adds missing changes to CQL.textile
 add 46d5ef4148 Merge branch cassandra-3.11 into cassandra-4.0
 add 00ad7f2ed9 Merge branch cassandra-4.0 into cassandra-4.1

No new revisions were added by this update.

Summary of changes:
 doc/cql3/CQL.textile | 218 ++-
 1 file changed, 181 insertions(+), 37 deletions(-)


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



[cassandra] branch trunk updated (872e34c2d6 -> 35578a4a9f)

2022-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from 872e34c2d6 add --older-than and --older-than-timestamp options for 
nodetool clearsnapshot
 add 0894fd97a2 Adds missing changes to CQL.textile
 add 46d5ef4148 Merge branch cassandra-3.11 into cassandra-4.0
 add 00ad7f2ed9 Merge branch cassandra-4.0 into cassandra-4.1
 new 35578a4a9f Merge branch cassandra-4.1 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:
 doc/cql3/CQL.textile | 218 ++-
 1 file changed, 181 insertions(+), 37 deletions(-)


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



[cassandra] branch cassandra-4.0 updated (756fb41512 -> 46d5ef4148)

2022-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 756fb41512 Merge branch 'cassandra-3.11' into cassandra-4.0
 add 0894fd97a2 Adds missing changes to CQL.textile
 add 46d5ef4148 Merge branch cassandra-3.11 into cassandra-4.0

No new revisions were added by this update.

Summary of changes:
 doc/cql3/CQL.textile | 143 ++-
 1 file changed, 129 insertions(+), 14 deletions(-)


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



[cassandra] 01/01: Merge branch cassandra-4.1 into trunk

2022-09-12 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 703ccdee29f7e8c39aeb976e72e516415d609cf4
Merge: d6aee7e08c 49cd4b5f79
Author: Benjamin Lerer 
AuthorDate: Mon Sep 12 14:58:17 2022 +0200

Merge branch cassandra-4.1 into trunk

 .../distributed/test/PaxosRepairTest.java  | 23 --
 1 file changed, 17 insertions(+), 6 deletions(-)


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



[cassandra] branch trunk updated (d6aee7e08c -> 703ccdee29)

2022-09-12 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from d6aee7e08c Optionally avoid hint transfer during decommission
 add 49cd4b5f79 Fix PaxosRepairTest#paxosRepairVersionGate
 new 703ccdee29 Merge branch cassandra-4.1 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:
 .../distributed/test/PaxosRepairTest.java  | 23 --
 1 file changed, 17 insertions(+), 6 deletions(-)


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



[cassandra] branch cassandra-4.1 updated (adb0128485 -> 49cd4b5f79)

2022-09-12 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from adb0128485 Merge branch 'cassandra-4.0' into cassandra-4.1
 add 49cd4b5f79 Fix PaxosRepairTest#paxosRepairVersionGate

No new revisions were added by this update.

Summary of changes:
 .../distributed/test/PaxosRepairTest.java  | 23 --
 1 file changed, 17 insertions(+), 6 deletions(-)


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



[cassandra-website] branch asf-site updated (05a73da2 -> 1698fa83)

2022-07-13 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cassandra-website.git


 discard 05a73da2 generate docs for 22eba1cc
 add bb74cfe5 July 2022 blog "Apache Cassandra Changelog #17"
 add 1698fa83 generate docs for bb74cfe5

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (05a73da2)
\
 N -- N -- N   refs/heads/asf-site (1698fa83)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../blog/the-apache-cassandra-corner-podcast.png   | Bin 0 -> 1872761 bytes
 content/_/blog.html|  24 +
 ...> Apache-Cassandra-Changelog-17-July-2022.html} | 104 +-
 content/search-index.js|   2 +-
 .../blog/the-apache-cassandra-corner-podcast.png   | Bin 0 -> 1872761 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  25 +
 .../Apache-Cassandra-Changelog-17-July-2022.adoc   | 116 +
 site-ui/build/ui-bundle.zip| Bin 4740078 -> 4740078 
bytes
 8 files changed, 221 insertions(+), 50 deletions(-)
 create mode 100644 
content/_/_images/blog/the-apache-cassandra-corner-podcast.png
 copy content/_/blog/{Apache-Cassandra-Changelog-16-June-2022.html => 
Apache-Cassandra-Changelog-17-July-2022.html} (65%)
 create mode 100644 
site-content/source/modules/ROOT/images/blog/the-apache-cassandra-corner-podcast.png
 create mode 100644 
site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-17-July-2022.adoc


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



[cassandra-website] branch trunk updated: July 2022 blog "Apache Cassandra Changelog #17"

2022-07-13 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new bb74cfe5 July 2022 blog "Apache Cassandra Changelog #17"
bb74cfe5 is described below

commit bb74cfe524b6ab5b220e0d0924607c7e9b39259c
Author: Diogenese Topper 
AuthorDate: Mon Jul 11 16:02:45 2022 -0700

July 2022 blog "Apache Cassandra Changelog #17"

patch by Chris Thornett, Diogenese Topper; reviewed by Benjamin Lerer for 
CASSANDRA-17745

Co-authored by: Chris Thornett 
Co-authored by: Diogenese Topper 
---
 .../blog/the-apache-cassandra-corner-podcast.png   | Bin 0 -> 1872761 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  25 +
 .../Apache-Cassandra-Changelog-17-July-2022.adoc   | 116 +
 3 files changed, 141 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/the-apache-cassandra-corner-podcast.png
 
b/site-content/source/modules/ROOT/images/blog/the-apache-cassandra-corner-podcast.png
new file mode 100644
index ..e7117170
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/the-apache-cassandra-corner-podcast.png
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 3e82a86d..c196f6e5 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -8,6 +8,31 @@ NOTES FOR CONTENT CREATORS
 - Replace post tile, date, description and link to you post.
 
 
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
+=== Apache Cassandra Changelog #17
+[discrete]
+ July 12, 2022
+--
+[openblock,card-content]
+--
+Cassandra 4.1 is getting closer, new Cassandra podcast and Cassandra World 
Party speakers and sponsors announced!
+
+[openblock,card-btn card-btn--blog]
+
+
+[.btn.btn--alt]
+xref:blog/Apache-Cassandra-Changelog-17-July-2022.adoc[Read More]
+
+
+--
+
+//end card
+
 //start card
 [openblock,card shadow relative test]
 
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-17-July-2022.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-17-July-2022.adoc
new file mode 100644
index ..51bade17
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-17-July-2022.adoc
@@ -0,0 +1,116 @@
+= Apache Cassandra Changelog #17
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: July 12, 2022
+:page-post-author: Chris Thornett
+:description: Apache Cassandra Changelog
+:keywords: Cassandra, changelog, updates, news, release notes, community,
+
+image::blog/changelog_header.jpg[Apache Cassandra Changelog]
+Our monthly roundup of key activities and knowledge to keep the community 
informed.
+
+== Release Notes
+
+=== Released
+
+We are focused on the final blockers to the next release of Apache Cassandra 
which will be 4.1. At the time of writing, we had 28 tickets remaining and the 
unassigned tickets would be a great introduction for someone new to 
contributing to the project (see details, below, on how to help).
+
+The latest release of Apache Cassandra remains 
https://www.apache.org/dyn/closer.lua/cassandra/4.0.4/apache-cassandra-4.0.4-bin.tar.gz[4.0.4^]
 
(https://downloads.apache.org/cassandra/4.0.4/apache-cassandra-4.0.4-bin.tar.gz.asc[pgp^],
 
https://downloads.apache.org/cassandra/4.0.4/apache-cassandra-4.0.4-bin.tar.gz.sha256[sha256^],
 and 
https://downloads.apache.org/cassandra/4.0.4/apache-cassandra-4.0.4-bin.tar.gz.sha512[sha512^]),
 which was released on 14 May 2022. 
+
+Please read the 
https://gitbox.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=NEWS.txt;hb=refs/tags/cassandra-4.0.4[4.0.4
 release notes^] and let us know if you encounter any problems.
+
+We also had a bug fix releases for both the 3.11 series 
(https://www.apache.org/dyn/closer.lua/cassandra/3.11.13/apache-cassandra-3.11.13-bin.tar.gz[3.11.13^],
 
https://downloads.apache.org/cassandra/3.11.13/apache-cassandra-3.11.13-bin.tar.gz.asc[pgp^],
 
https://downloads.apache.org/cassandra/3.11.13/apache-cassandra-3.11.13-bin.tar.gz.sha256[sha256^],
 
https://downloads.apache.org/cassandra/3.11.13/apache-cassandra-3.11.13-bin.tar.gz.sha512[sha512^])
 and 3.0 series (https://www.apache.org [...]
+
+Please read the release notes for 
https://gitbox.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=NEWS.txt;hb=refs/tags/cassandra-3.11.13[3.11.13^]
 and 
https://gitbox.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=NEWS.txt;hb=refs/tags/cassandra-3.0.27[3.0.27^]
 and let us know if you encounter any problems.
+
+*Note:* For this release cycle only, we will continue to support 3.0. as well 
as the 3.11., 4.0

[cassandra] 01/01: Merge branch cassandra-4.1 into trunk

2022-07-12 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 239b3e50798d80fe81ceb56db3c5c869d675a8e3
Merge: 8468d33a31 cdc0ce1fa3
Author: Benjamin Lerer 
AuthorDate: Mon Jul 11 17:43:36 2022 +0200

Merge branch cassandra-4.1 into trunk

 .../service/paxos/uncommitted/PaxosUncommittedIndex.java | 2 +-
 .../service/paxos/uncommitted/PaxosUncommittedTracker.java   | 9 +
 .../org/apache/cassandra/distributed/test/PaxosRepairTest2.java  | 5 ++---
 .../service/paxos/uncommitted/PaxosUncommittedTrackerTest.java   | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)


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



[cassandra] branch trunk updated (8468d33a31 -> 239b3e5079)

2022-07-12 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from 8468d33a31 Merge branch 'cassandra-4.1' into trunk
 add cdc0ce1fa3 Prevent premature initialization of paxos metadata files 
during tests
 new 239b3e5079 Merge branch cassandra-4.1 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:
 .../service/paxos/uncommitted/PaxosUncommittedIndex.java | 2 +-
 .../service/paxos/uncommitted/PaxosUncommittedTracker.java   | 9 +
 .../org/apache/cassandra/distributed/test/PaxosRepairTest2.java  | 5 ++---
 .../service/paxos/uncommitted/PaxosUncommittedTrackerTest.java   | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)


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



[cassandra] branch cassandra-4.1 updated (067121da63 -> cdc0ce1fa3)

2022-07-12 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 067121da63 Paxos v2 Linearizability Violation
 add cdc0ce1fa3 Prevent premature initialization of paxos metadata files 
during tests

No new revisions were added by this update.

Summary of changes:
 .../service/paxos/uncommitted/PaxosUncommittedIndex.java | 2 +-
 .../service/paxos/uncommitted/PaxosUncommittedTracker.java   | 9 +
 .../org/apache/cassandra/distributed/test/PaxosRepairTest2.java  | 5 ++---
 .../service/paxos/uncommitted/PaxosUncommittedTrackerTest.java   | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)


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



[cassandra] branch cassandra-4.0 updated (5072bde5fb -> 12b588da08)

2022-07-11 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 5072bde5fb Merge branch 'cassandra-3.11' into cassandra-4.0
 add dd51df6734 Only use statically defined subcolumns when determining 
column definition for supercolumn cell
 add 12b588da08 Merge branch cassandra-3.11 into cassandra-4.0

No new revisions were added by this update.

Summary of changes:


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



[cassandra] 01/01: Merge branch cassandra-4.1 into trunk

2022-07-11 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 6fcaed8fd635f84acf402dbf86fe94af0a7406ca
Merge: cc28e1a85e f50862b434
Author: Benjamin Lerer 
AuthorDate: Mon Jul 11 16:50:31 2022 +0200

Merge branch cassandra-4.1 into trunk



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



[cassandra] branch trunk updated (cc28e1a85e -> 6fcaed8fd6)

2022-07-11 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from cc28e1a85e Merge branch 'cassandra-4.1' into trunk
 add dd51df6734 Only use statically defined subcolumns when determining 
column definition for supercolumn cell
 add 12b588da08 Merge branch cassandra-3.11 into cassandra-4.0
 add f50862b434 Merge branch cassandra-4.0 into cassandra-4.1
 new 6fcaed8fd6 Merge branch cassandra-4.1 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:


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



[cassandra] branch cassandra-3.11 updated (ef6bce5084 -> dd51df6734)

2022-07-11 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from ef6bce5084 Removing superfluous bullet points in FAQ page
 add dd51df6734 Only use statically defined subcolumns when determining 
column definition for supercolumn cell

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|  1 +
 src/java/org/apache/cassandra/db/LegacyLayout.java | 15 ++-
 .../org/apache/cassandra/db/LegacyLayoutTest.java  | 50 ++
 3 files changed, 64 insertions(+), 2 deletions(-)


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



[cassandra] branch cassandra-4.1 updated (1d80dd0086 -> f50862b434)

2022-07-11 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 1d80dd0086 Fix flaky test - 
org.apache.cassandra.cql3.validation.operations.InsertUpdateIfConditionTest.testConditionalUpdate
 add dd51df6734 Only use statically defined subcolumns when determining 
column definition for supercolumn cell
 add 12b588da08 Merge branch cassandra-3.11 into cassandra-4.0
 add f50862b434 Merge branch cassandra-4.0 into cassandra-4.1

No new revisions were added by this update.

Summary of changes:


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



[cassandra] 01/01: Merge branch cassandra-4.1 into trunk

2022-07-07 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit b29ad8823a20d910a0b9b984b06421f390cc0a17
Merge: ab0a9b5f5c 50e7a3f5df
Author: Benjamin Lerer 
AuthorDate: Thu Jul 7 14:11:03 2022 +0200

Merge branch cassandra-4.1 into trunk

 CHANGES.txt|   1 +
 .../apache/cassandra/cql3/ColumnIdentifier.java|   6 +-
 .../apache/cassandra/db/ArrayClusteringBound.java  |   7 +-
 .../apache/cassandra/db/BufferClusteringBound.java |   6 +-
 .../cassandra/db/BufferClusteringBoundary.java |   6 +-
 src/java/org/apache/cassandra/db/Clustering.java   |   6 +-
 .../org/apache/cassandra/db/ClusteringBound.java   |   4 +-
 .../cassandra/db/ClusteringBoundOrBoundary.java|   6 +-
 src/java/org/apache/cassandra/db/Columns.java  | 127 +++--
 src/java/org/apache/cassandra/db/DeletionInfo.java |   5 +-
 .../org/apache/cassandra/db/EmptyIterators.java|   2 +-
 .../apache/cassandra/db/MutableDeletionInfo.java   |   7 +-
 .../apache/cassandra/db/RangeTombstoneList.java|  12 +-
 .../cassandra/db/RegularAndStaticColumns.java  |  18 +-
 .../apache/cassandra/db/compaction/Scrubber.java   |  32 +-
 .../db/filter/ClusteringIndexNamesFilter.java  |  13 +-
 .../db/memtable/ShardedSkipListMemtable.java   |   6 +-
 .../cassandra/db/memtable/SkipListMemtable.java|   9 +-
 .../db/partitions/AbstractBTreePartition.java  |  52 +-
 .../db/partitions/AtomicBTreePartition.java| 101 ++--
 .../cassandra/db/partitions/FilteredPartition.java |   2 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |  29 +-
 .../org/apache/cassandra/db/rows/AbstractCell.java |   8 +-
 .../org/apache/cassandra/db/rows/ArrayCell.java|   7 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java | 107 +++-
 .../org/apache/cassandra/db/rows/BufferCell.java   |  10 +
 src/java/org/apache/cassandra/db/rows/Cell.java|  11 +-
 .../org/apache/cassandra/db/rows/CellPath.java |  12 +-
 src/java/org/apache/cassandra/db/rows/Cells.java   | 112 
 .../org/apache/cassandra/db/rows/ColumnData.java   | 172 ++
 .../cassandra/db/rows/ComplexColumnData.java   |  42 +-
 .../db/rows/RangeTombstoneBoundMarker.java |   7 +-
 .../db/rows/RangeTombstoneBoundaryMarker.java  |   9 +-
 .../cassandra/db/rows/RangeTombstoneMarker.java|   4 +-
 src/java/org/apache/cassandra/db/rows/Row.java |  24 +-
 src/java/org/apache/cassandra/db/rows/Rows.java| 120 +---
 .../db/rows/WrappingUnfilteredRowIterator.java |   2 +-
 .../org/apache/cassandra/db/view/TableViews.java   |  24 +-
 .../org/apache/cassandra/dht/LocalPartitioner.java |   4 +-
 .../index/internal/CassandraIndexSearcher.java |   6 +-
 .../org/apache/cassandra/io/sstable/SSTable.java   |   4 +-
 .../org/apache/cassandra/utils/btree/BTree.java|  85 +--
 .../cassandra/utils/btree/UpdateFunction.java  |  23 +-
 ...bstractAllocator.java => ByteBufferCloner.java} |  84 ++-
 .../org/apache/cassandra/utils/memory/Cloner.java  |  54 ++
 .../cassandra/utils/memory/ContextAllocator.java   |  59 --
 .../cassandra/utils/memory/EnsureOnHeap.java   |   8 +-
 .../cassandra/utils/memory/HeapAllocator.java  |  41 --
 .../apache/cassandra/utils/memory/HeapCloner.java  |  37 ++
 .../apache/cassandra/utils/memory/HeapPool.java|  19 +-
 .../cassandra/utils/memory/MemtableAllocator.java  |   7 +-
 .../utils/memory/MemtableBufferAllocator.java  |  23 +-
 .../cassandra/utils/memory/NativeAllocator.java|  31 +-
 .../cassandra/utils/memory/SlabAllocator.java  |   4 +-
 .../org/apache/cassandra/utils/LongBTreeTest.java  |   8 +-
 .../btree/AtomicBTreePartitionUpdateBench.java | 615 +
 .../test/microbench/btree/Megamorphism.java|  14 +-
 .../cql3/validation/operations/DeleteTest.java |   1 +
 test/unit/org/apache/cassandra/db/CellTest.java|  46 +-
 .../org/apache/cassandra/db/NativeCellTest.java|  12 +-
 .../org/apache/cassandra/db/rows/RowBuilder.java   |  91 ---
 .../apache/cassandra/db/rows/RowsMergingTest.java  | 286 ++
 .../org/apache/cassandra/db/rows/RowsTest.java |  90 +--
 .../apache/cassandra/utils/btree/BTreeTest.java|  13 +-
 64 files changed, 1904 insertions(+), 889 deletions(-)

diff --cc src/java/org/apache/cassandra/dht/LocalPartitioner.java
index df976701aa,09cd2b7d4a..127c5b7ded
--- a/src/java/org/apache/cassandra/dht/LocalPartitioner.java
+++ b/src/java/org/apache/cassandra/dht/LocalPartitioner.java
@@@ -26,12 -26,9 +26,12 @@@ import java.util.Random
  import org.apache.cassandra.db.DecoratedKey;
  import org.apache.cassandra.db.CachedHashDecoratedKey;
  import org.apache.cassandra.db.marshal.AbstractType;
 +import org.apache.cassandra.db.marshal.ByteBufferAccessor;
  import org.apache.cassandra.utils.ByteBufferUtil;
 +import org.apache.cassandra.utils.bytecomparable.ByteComparable;
 +imp

[cassandra] branch trunk updated (ab0a9b5f5c -> b29ad8823a)

2022-07-07 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from ab0a9b5f5c Merge branch 'cassandra-4.1' into trunk
 add c378874a9f Utilise BTree improvements to reduce garbage and improve 
throughput
 add 50e7a3f5df Merge branch cassandra-4.0 into cassandra-4.1
 new b29ad8823a Merge branch cassandra-4.1 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 +
 .../apache/cassandra/cql3/ColumnIdentifier.java|   6 +-
 .../apache/cassandra/db/ArrayClusteringBound.java  |   7 +-
 .../apache/cassandra/db/BufferClusteringBound.java |   6 +-
 .../cassandra/db/BufferClusteringBoundary.java |   6 +-
 src/java/org/apache/cassandra/db/Clustering.java   |   6 +-
 .../org/apache/cassandra/db/ClusteringBound.java   |   4 +-
 .../cassandra/db/ClusteringBoundOrBoundary.java|   6 +-
 src/java/org/apache/cassandra/db/Columns.java  | 127 +++--
 src/java/org/apache/cassandra/db/DeletionInfo.java |   5 +-
 .../org/apache/cassandra/db/EmptyIterators.java|   2 +-
 .../apache/cassandra/db/MutableDeletionInfo.java   |   7 +-
 .../apache/cassandra/db/RangeTombstoneList.java|  12 +-
 .../cassandra/db/RegularAndStaticColumns.java  |  18 +-
 .../apache/cassandra/db/compaction/Scrubber.java   |  32 +-
 .../db/filter/ClusteringIndexNamesFilter.java  |  13 +-
 .../db/memtable/ShardedSkipListMemtable.java   |   6 +-
 .../cassandra/db/memtable/SkipListMemtable.java|   9 +-
 .../db/partitions/AbstractBTreePartition.java  |  52 +-
 .../db/partitions/AtomicBTreePartition.java| 101 ++--
 .../cassandra/db/partitions/FilteredPartition.java |   2 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |  29 +-
 .../org/apache/cassandra/db/rows/AbstractCell.java |   8 +-
 .../org/apache/cassandra/db/rows/ArrayCell.java|   7 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java | 107 +++-
 .../org/apache/cassandra/db/rows/BufferCell.java   |  10 +
 src/java/org/apache/cassandra/db/rows/Cell.java|  11 +-
 .../org/apache/cassandra/db/rows/CellPath.java |  12 +-
 src/java/org/apache/cassandra/db/rows/Cells.java   | 112 
 .../org/apache/cassandra/db/rows/ColumnData.java   | 172 ++
 .../cassandra/db/rows/ComplexColumnData.java   |  42 +-
 .../db/rows/RangeTombstoneBoundMarker.java |   7 +-
 .../db/rows/RangeTombstoneBoundaryMarker.java  |   9 +-
 .../cassandra/db/rows/RangeTombstoneMarker.java|   4 +-
 src/java/org/apache/cassandra/db/rows/Row.java |  24 +-
 src/java/org/apache/cassandra/db/rows/Rows.java| 120 +---
 .../db/rows/WrappingUnfilteredRowIterator.java |   2 +-
 .../org/apache/cassandra/db/view/TableViews.java   |  24 +-
 .../org/apache/cassandra/dht/LocalPartitioner.java |   4 +-
 .../index/internal/CassandraIndexSearcher.java |   6 +-
 .../org/apache/cassandra/io/sstable/SSTable.java   |   4 +-
 .../org/apache/cassandra/utils/btree/BTree.java|  85 +--
 .../cassandra/utils/btree/UpdateFunction.java  |  23 +-
 ...bstractAllocator.java => ByteBufferCloner.java} |  84 ++-
 .../utils/memory/{SlabPool.java => Cloner.java}|  43 +-
 .../cassandra/utils/memory/ContextAllocator.java   |  59 --
 .../cassandra/utils/memory/EnsureOnHeap.java   |   8 +-
 .../cassandra/utils/memory/HeapAllocator.java  |  41 --
 .../memory/{NativePool.java => HeapCloner.java}|  22 +-
 .../apache/cassandra/utils/memory/HeapPool.java|  19 +-
 .../cassandra/utils/memory/MemtableAllocator.java  |   7 +-
 .../utils/memory/MemtableBufferAllocator.java  |  23 +-
 .../cassandra/utils/memory/NativeAllocator.java|  31 +-
 .../cassandra/utils/memory/SlabAllocator.java  |   4 +-
 .../org/apache/cassandra/utils/LongBTreeTest.java  |   8 +-
 .../btree/AtomicBTreePartitionUpdateBench.java | 615 +
 .../test/microbench/btree/Megamorphism.java|  14 +-
 .../cql3/validation/operations/DeleteTest.java |   1 +
 test/unit/org/apache/cassandra/db/CellTest.java|  46 +-
 .../org/apache/cassandra/db/NativeCellTest.java|  12 +-
 .../org/apache/cassandra/db/rows/RowBuilder.java   |  91 ---
 .../apache/cassandra/db/rows/RowsMergingTest.java  | 286 ++
 .../org/apache/cassandra/db/rows/RowsTest.java |  90 +--
 .../apache/cassandra/utils/btree/BTreeTest.java|  13 +-
 64 files changed, 1857 insertions(+), 910 deletions(-)
 rename src/java/org/apache/cassandra/utils/memory/{AbstractAllocator.java => 
ByteBufferCloner.java} (50%)
 copy src/java/org/apache/cassandra/utils/memory/{SlabPool.java => Cloner.java} 
(54%)
 delete mode 100644 
src/java/org/apache/cassandra/utils/memory

[cassandra] branch cassandra-4.1 updated (a250126f0f -> 50e7a3f5df)

2022-07-07 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from a250126f0f Remove commons-lang dependency during build runtime
 add c378874a9f Utilise BTree improvements to reduce garbage and improve 
throughput
 add 50e7a3f5df Merge branch cassandra-4.0 into cassandra-4.1

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|   1 +
 .../apache/cassandra/cql3/ColumnIdentifier.java|   6 +-
 .../apache/cassandra/db/ArrayClusteringBound.java  |   7 +-
 .../apache/cassandra/db/BufferClusteringBound.java |   6 +-
 .../cassandra/db/BufferClusteringBoundary.java |   6 +-
 src/java/org/apache/cassandra/db/Clustering.java   |   6 +-
 .../org/apache/cassandra/db/ClusteringBound.java   |   4 +-
 .../cassandra/db/ClusteringBoundOrBoundary.java|   6 +-
 src/java/org/apache/cassandra/db/Columns.java  | 127 +++--
 src/java/org/apache/cassandra/db/DeletionInfo.java |   5 +-
 .../org/apache/cassandra/db/EmptyIterators.java|   2 +-
 .../apache/cassandra/db/MutableDeletionInfo.java   |   7 +-
 .../apache/cassandra/db/RangeTombstoneList.java|  12 +-
 .../cassandra/db/RegularAndStaticColumns.java  |  18 +-
 .../apache/cassandra/db/compaction/Scrubber.java   |  32 +-
 .../db/filter/ClusteringIndexNamesFilter.java  |  13 +-
 .../db/memtable/ShardedSkipListMemtable.java   |   6 +-
 .../cassandra/db/memtable/SkipListMemtable.java|   9 +-
 .../db/partitions/AbstractBTreePartition.java  |  52 +-
 .../db/partitions/AtomicBTreePartition.java| 101 ++--
 .../cassandra/db/partitions/FilteredPartition.java |   2 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |  29 +-
 .../org/apache/cassandra/db/rows/AbstractCell.java |   8 +-
 .../org/apache/cassandra/db/rows/ArrayCell.java|   7 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java | 107 +++-
 .../org/apache/cassandra/db/rows/BufferCell.java   |  10 +
 src/java/org/apache/cassandra/db/rows/Cell.java|  11 +-
 .../org/apache/cassandra/db/rows/CellPath.java |  12 +-
 src/java/org/apache/cassandra/db/rows/Cells.java   | 112 
 .../org/apache/cassandra/db/rows/ColumnData.java   | 172 ++
 .../cassandra/db/rows/ComplexColumnData.java   |  42 +-
 .../db/rows/RangeTombstoneBoundMarker.java |   7 +-
 .../db/rows/RangeTombstoneBoundaryMarker.java  |   9 +-
 .../cassandra/db/rows/RangeTombstoneMarker.java|   4 +-
 src/java/org/apache/cassandra/db/rows/Row.java |  24 +-
 src/java/org/apache/cassandra/db/rows/Rows.java| 120 +---
 .../db/rows/WrappingUnfilteredRowIterator.java |   2 +-
 .../org/apache/cassandra/db/view/TableViews.java   |  24 +-
 .../org/apache/cassandra/dht/LocalPartitioner.java |   4 +-
 .../index/internal/CassandraIndexSearcher.java |   6 +-
 .../org/apache/cassandra/io/sstable/SSTable.java   |   4 +-
 .../org/apache/cassandra/utils/btree/BTree.java|  85 +--
 .../cassandra/utils/btree/UpdateFunction.java  |  23 +-
 ...bstractAllocator.java => ByteBufferCloner.java} |  84 ++-
 .../utils/memory/{SlabPool.java => Cloner.java}|  43 +-
 .../cassandra/utils/memory/ContextAllocator.java   |  59 --
 .../cassandra/utils/memory/EnsureOnHeap.java   |   8 +-
 .../cassandra/utils/memory/HeapAllocator.java  |  41 --
 .../memory/{NativePool.java => HeapCloner.java}|  22 +-
 .../apache/cassandra/utils/memory/HeapPool.java|  19 +-
 .../cassandra/utils/memory/MemtableAllocator.java  |   7 +-
 .../utils/memory/MemtableBufferAllocator.java  |  23 +-
 .../cassandra/utils/memory/NativeAllocator.java|  31 +-
 .../cassandra/utils/memory/SlabAllocator.java  |   4 +-
 .../org/apache/cassandra/utils/LongBTreeTest.java  |   8 +-
 .../btree/AtomicBTreePartitionUpdateBench.java | 615 +
 .../test/microbench/btree/Megamorphism.java|  14 +-
 .../cql3/validation/operations/DeleteTest.java |   1 +
 test/unit/org/apache/cassandra/db/CellTest.java|  46 +-
 .../org/apache/cassandra/db/NativeCellTest.java|  12 +-
 .../org/apache/cassandra/db/rows/RowBuilder.java   |  91 ---
 .../apache/cassandra/db/rows/RowsMergingTest.java  | 286 ++
 .../org/apache/cassandra/db/rows/RowsTest.java |  90 +--
 .../apache/cassandra/utils/btree/BTreeTest.java|  13 +-
 64 files changed, 1857 insertions(+), 910 deletions(-)
 rename src/java/org/apache/cassandra/utils/memory/{AbstractAllocator.java => 
ByteBufferCloner.java} (50%)
 copy src/java/org/apache/cassandra/utils/memory/{SlabPool.java => Cloner.java} 
(54%)
 delete mode 100644 
src/java/org/apache/cassandra/utils/memory/ContextAllocator.java
 delete mode 100644 
src/java/org/apache/cassandra/utils/memory/HeapAllocator.java
 copy src/java/org/apache/cassandra/utils/memory/{NativePool.java => 
HeapCloner.java} (70%)
 create mode 100644 
test/microbench/org/apa

[cassandra] branch cassandra-4.0 updated (924cd8f52c -> c378874a9f)

2022-07-07 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 924cd8f52c Make sure delayed timeout task in StreamTransferTask cannot 
prevent clean shutdown
 add c378874a9f Utilise BTree improvements to reduce garbage and improve 
throughput

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|   1 +
 .../apache/cassandra/cql3/ColumnIdentifier.java|   6 +-
 .../apache/cassandra/db/ArrayClusteringBound.java  |   7 +-
 .../apache/cassandra/db/BufferClusteringBound.java |   7 +-
 .../cassandra/db/BufferClusteringBoundary.java |   7 +-
 src/java/org/apache/cassandra/db/Clustering.java   |   6 +-
 .../org/apache/cassandra/db/ClusteringBound.java   |   4 +-
 .../cassandra/db/ClusteringBoundOrBoundary.java|   6 +-
 src/java/org/apache/cassandra/db/Columns.java  | 127 +++--
 src/java/org/apache/cassandra/db/DeletionInfo.java |   5 +-
 .../org/apache/cassandra/db/EmptyIterators.java|   2 +-
 src/java/org/apache/cassandra/db/Memtable.java |   9 +-
 .../apache/cassandra/db/MutableDeletionInfo.java   |   7 +-
 .../apache/cassandra/db/RangeTombstoneList.java|  12 +-
 .../cassandra/db/RegularAndStaticColumns.java  |  18 +-
 .../apache/cassandra/db/compaction/Scrubber.java   |  32 +-
 .../db/filter/ClusteringIndexNamesFilter.java  |  13 +-
 .../db/partitions/AbstractBTreePartition.java  |  52 +-
 .../db/partitions/AtomicBTreePartition.java| 102 ++--
 .../cassandra/db/partitions/FilteredPartition.java |   2 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |  29 +-
 .../org/apache/cassandra/db/rows/AbstractCell.java |   7 +-
 .../org/apache/cassandra/db/rows/ArrayCell.java|   7 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java | 107 +++-
 .../org/apache/cassandra/db/rows/BufferCell.java   |   7 +-
 src/java/org/apache/cassandra/db/rows/Cell.java|  11 +-
 .../org/apache/cassandra/db/rows/CellPath.java |  12 +-
 src/java/org/apache/cassandra/db/rows/Cells.java   | 112 
 .../org/apache/cassandra/db/rows/ColumnData.java   | 172 ++
 .../cassandra/db/rows/ComplexColumnData.java   |  42 +-
 .../db/rows/RangeTombstoneBoundMarker.java |   7 +-
 .../db/rows/RangeTombstoneBoundaryMarker.java  |   7 +-
 .../cassandra/db/rows/RangeTombstoneMarker.java|   4 +-
 src/java/org/apache/cassandra/db/rows/Row.java |  24 +-
 src/java/org/apache/cassandra/db/rows/Rows.java| 116 +---
 .../db/rows/WrappingUnfilteredRowIterator.java |   2 +-
 .../org/apache/cassandra/db/view/TableViews.java   |  24 +-
 .../org/apache/cassandra/dht/LocalPartitioner.java |   4 +-
 .../index/internal/CassandraIndexSearcher.java |   6 +-
 .../org/apache/cassandra/io/sstable/SSTable.java   |   4 +-
 .../org/apache/cassandra/utils/btree/BTree.java|  85 +--
 .../cassandra/utils/btree/UpdateFunction.java  |  23 +-
 ...bstractAllocator.java => ByteBufferCloner.java} |  84 ++-
 .../utils/memory/{SlabPool.java => Cloner.java}|  43 +-
 .../cassandra/utils/memory/ContextAllocator.java   |  59 --
 .../cassandra/utils/memory/EnsureOnHeap.java   |   8 +-
 .../cassandra/utils/memory/HeapAllocator.java  |  41 --
 .../memory/{NativePool.java => HeapCloner.java}|  22 +-
 .../apache/cassandra/utils/memory/HeapPool.java|  14 +-
 .../cassandra/utils/memory/MemtableAllocator.java  |   6 +-
 .../utils/memory/MemtableBufferAllocator.java  |  23 +-
 .../cassandra/utils/memory/NativeAllocator.java|  31 +-
 .../cassandra/utils/memory/SlabAllocator.java  |   4 +-
 .../org/apache/cassandra/utils/LongBTreeTest.java  |   8 +-
 .../btree/AtomicBTreePartitionUpdateBench.java | 614 +
 .../test/microbench/btree/Megamorphism.java|  14 +-
 .../cql3/validation/operations/DeleteTest.java |   1 +
 test/unit/org/apache/cassandra/db/CellTest.java|  46 +-
 .../org/apache/cassandra/db/NativeCellTest.java|  12 +-
 .../org/apache/cassandra/db/rows/RowBuilder.java   |  91 ---
 .../apache/cassandra/db/rows/RowsMergingTest.java  | 286 ++
 .../org/apache/cassandra/db/rows/RowsTest.java |  90 +--
 .../utils/btree/BTreeSearchIteratorTest.java   |   2 -
 .../apache/cassandra/utils/btree/BTreeTest.java|  13 +-
 64 files changed, 1836 insertions(+), 913 deletions(-)
 rename src/java/org/apache/cassandra/utils/memory/{AbstractAllocator.java => 
ByteBufferCloner.java} (50%)
 copy src/java/org/apache/cassandra/utils/memory/{SlabPool.java => Cloner.java} 
(54%)
 delete mode 100644 
src/java/org/apache/cassandra/utils/memory/ContextAllocator.java
 delete mode 100644 
src/java/org/apache/cassandra/utils/memory/HeapAllocator.java
 copy src/java/org/apache/cassandra/utils/memory/{NativePool.java => 
HeapCloner.java} (71%)
 create mode 100644 
test/microbench/org/apache/cassandra/tes

[cassandra] branch cassandra-4.1 updated (030831c5f5 -> 596daeb7f0)

2022-05-06 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 030831c5f5 Rename truncate_drop guardrail to drop_truncate_table
 add 596daeb7f0 Optimise BTree build, update and transform operations

No new revisions were added by this update.

Summary of changes:
 src/java/org/apache/cassandra/db/Columns.java  |4 +-
 .../db/partitions/AtomicBTreePartition.java|   14 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |6 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java |2 +-
 .../cassandra/db/rows/ComplexColumnData.java   |   27 +-
 src/java/org/apache/cassandra/db/rows/Row.java |2 +-
 .../org/apache/cassandra/utils/BulkIterator.java   |  112 +
 .../org/apache/cassandra/utils/btree/BTree.java| 3484 +---
 .../apache/cassandra/utils/btree/BTreeRemoval.java |   12 +-
 .../org/apache/cassandra/utils/btree/BTreeSet.java |   46 +-
 .../apache/cassandra/utils/btree/NodeBuilder.java  |  441 ---
 .../apache/cassandra/utils/btree/TreeBuilder.java  |  121 -
 .../cassandra/utils/btree/UpdateFunction.java  |   32 +-
 .../utils/caching/TinyThreadLocalPool.java |   85 +
 .../org/apache/cassandra/utils/LongBTreeTest.java  |  587 ++--
 .../BTreeBench.java}   |   75 +-
 .../test/microbench/btree/BTreeBuildBench.java |  127 +
 .../test/microbench/btree/BTreeTransformBench.java |  194 ++
 .../test/microbench/btree/BTreeUpdateBench.java|  324 ++
 .../test/microbench/btree/IntVisitor.java  |   85 +
 .../test/microbench/btree/Megamorphism.java|  169 +
 .../cassandra/utils/btree/BTreeRemovalTest.java|   17 +-
 .../utils/btree/BTreeSearchIteratorTest.java   |6 +-
 .../apache/cassandra/utils/btree/BTreeTest.java|  238 +-
 24 files changed, 4706 insertions(+), 1504 deletions(-)
 create mode 100644 src/java/org/apache/cassandra/utils/BulkIterator.java
 delete mode 100644 src/java/org/apache/cassandra/utils/btree/NodeBuilder.java
 delete mode 100644 src/java/org/apache/cassandra/utils/btree/TreeBuilder.java
 create mode 100644 
src/java/org/apache/cassandra/utils/caching/TinyThreadLocalPool.java
 copy 
test/microbench/org/apache/cassandra/test/microbench/{BTreeBuildBench.java => 
btree/BTreeBench.java} (54%)
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeBuildBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeTransformBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeUpdateBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/IntVisitor.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/Megamorphism.java


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



[cassandra] branch trunk updated (2f1c785910 -> acb5337e92)

2022-05-06 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from 2f1c785910 Merge branch 'cassandra-4.1' into trunk
 add 596daeb7f0 Optimise BTree build, update and transform operations
 new acb5337e92 Merge branch cassandra-4.1 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/db/Columns.java  |4 +-
 .../db/partitions/AtomicBTreePartition.java|   14 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |6 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java |2 +-
 .../cassandra/db/rows/ComplexColumnData.java   |   27 +-
 src/java/org/apache/cassandra/db/rows/Row.java |2 +-
 .../org/apache/cassandra/utils/BulkIterator.java   |  112 +
 .../org/apache/cassandra/utils/btree/BTree.java| 3484 +---
 .../apache/cassandra/utils/btree/BTreeRemoval.java |   12 +-
 .../org/apache/cassandra/utils/btree/BTreeSet.java |   46 +-
 .../apache/cassandra/utils/btree/NodeBuilder.java  |  441 ---
 .../apache/cassandra/utils/btree/TreeBuilder.java  |  121 -
 .../cassandra/utils/btree/UpdateFunction.java  |   32 +-
 .../utils/caching/TinyThreadLocalPool.java |   85 +
 .../org/apache/cassandra/utils/LongBTreeTest.java  |  587 ++--
 .../BTreeBench.java}   |   75 +-
 .../test/microbench/btree/BTreeBuildBench.java |  127 +
 .../test/microbench/btree/BTreeTransformBench.java |  194 ++
 .../test/microbench/btree/BTreeUpdateBench.java|  324 ++
 .../test/microbench/btree/IntVisitor.java  |   85 +
 .../test/microbench/btree/Megamorphism.java|  169 +
 .../cassandra/utils/btree/BTreeRemovalTest.java|   17 +-
 .../utils/btree/BTreeSearchIteratorTest.java   |6 +-
 .../apache/cassandra/utils/btree/BTreeTest.java|  238 +-
 24 files changed, 4706 insertions(+), 1504 deletions(-)
 create mode 100644 src/java/org/apache/cassandra/utils/BulkIterator.java
 delete mode 100644 src/java/org/apache/cassandra/utils/btree/NodeBuilder.java
 delete mode 100644 src/java/org/apache/cassandra/utils/btree/TreeBuilder.java
 create mode 100644 
src/java/org/apache/cassandra/utils/caching/TinyThreadLocalPool.java
 copy 
test/microbench/org/apache/cassandra/test/microbench/{BTreeBuildBench.java => 
btree/BTreeBench.java} (54%)
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeBuildBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeTransformBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeUpdateBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/IntVisitor.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/Megamorphism.java


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



[cassandra] 01/01: Merge branch cassandra-4.1 into trunk

2022-05-06 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit acb5337e92c3032297c7fb9cfa7af4ef578c7c27
Merge: 2f1c785910 596daeb7f0
Author: Benjamin Lerer 
AuthorDate: Fri May 6 18:15:43 2022 +0200

Merge branch cassandra-4.1 into trunk

 src/java/org/apache/cassandra/db/Columns.java  |4 +-
 .../db/partitions/AtomicBTreePartition.java|   14 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |6 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java |2 +-
 .../cassandra/db/rows/ComplexColumnData.java   |   27 +-
 src/java/org/apache/cassandra/db/rows/Row.java |2 +-
 .../org/apache/cassandra/utils/BulkIterator.java   |  112 +
 .../org/apache/cassandra/utils/btree/BTree.java| 3484 +---
 .../apache/cassandra/utils/btree/BTreeRemoval.java |   12 +-
 .../org/apache/cassandra/utils/btree/BTreeSet.java |   46 +-
 .../apache/cassandra/utils/btree/NodeBuilder.java  |  441 ---
 .../apache/cassandra/utils/btree/TreeBuilder.java  |  121 -
 .../cassandra/utils/btree/UpdateFunction.java  |   32 +-
 .../utils/caching/TinyThreadLocalPool.java |   85 +
 .../org/apache/cassandra/utils/LongBTreeTest.java  |  587 ++--
 .../test/microbench/btree/BTreeBench.java  |   89 +
 .../test/microbench/btree/BTreeBuildBench.java |  127 +
 .../test/microbench/btree/BTreeTransformBench.java |  194 ++
 .../test/microbench/btree/BTreeUpdateBench.java|  324 ++
 .../test/microbench/btree/IntVisitor.java  |   85 +
 .../test/microbench/btree/Megamorphism.java|  169 +
 .../cassandra/utils/btree/BTreeRemovalTest.java|   17 +-
 .../utils/btree/BTreeSearchIteratorTest.java   |6 +-
 .../apache/cassandra/utils/btree/BTreeTest.java|  238 +-
 24 files changed, 4764 insertions(+), 1460 deletions(-)


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



[cassandra] 01/01: Merge branch cassandra-4.0 into trunk

2022-04-22 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 003a96b6a6f649f99138b94c52d28b73c2c3547a
Merge: 2723c91878 018c8e0d5e
Author: Benjamin Lerer 
AuthorDate: Fri Apr 22 19:28:32 2022 +0200

Merge branch cassandra-4.0 into trunk



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



[cassandra] branch trunk updated (2723c91878 -> 003a96b6a6)

2022-04-22 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from 2723c91878 Merge branch 'cassandra-4.0' into trunk
 add 018c8e0d5e Optimise BTree build, update and transform operations
 new 003a96b6a6 Merge branch cassandra-4.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:


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



[cassandra] branch cassandra-4.0 updated (2873c91269 -> 018c8e0d5e)

2022-04-22 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 2873c91269 Split ReadRepairQueryTypesTest to avoid JUnit timeouts
 add 018c8e0d5e Optimise BTree build, update and transform operations

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|3 +
 build.xml  |4 +-
 src/java/org/apache/cassandra/db/Columns.java  |4 +-
 .../db/partitions/AtomicBTreePartition.java|   14 +-
 .../cassandra/db/partitions/PartitionUpdate.java   |6 +-
 .../org/apache/cassandra/db/rows/BTreeRow.java |2 +-
 .../cassandra/db/rows/ComplexColumnData.java   |   27 +-
 src/java/org/apache/cassandra/db/rows/Row.java |2 +-
 .../org/apache/cassandra/utils/BulkIterator.java   |  112 +
 .../org/apache/cassandra/utils/btree/BTree.java| 3485 +---
 .../apache/cassandra/utils/btree/BTreeRemoval.java |   12 +-
 .../org/apache/cassandra/utils/btree/BTreeSet.java |   46 +-
 .../apache/cassandra/utils/btree/NodeBuilder.java  |  441 ---
 .../apache/cassandra/utils/btree/TreeBuilder.java  |  121 -
 .../cassandra/utils/btree/UpdateFunction.java  |   32 +-
 .../utils/caching/TinyThreadLocalPool.java |   85 +
 .../org/apache/cassandra/utils/LongBTreeTest.java  |  587 ++--
 .../BTreeBench.java}   |   75 +-
 .../test/microbench/btree/BTreeBuildBench.java |  127 +
 .../test/microbench/btree/BTreeTransformBench.java |  194 ++
 .../test/microbench/btree/BTreeUpdateBench.java|  324 ++
 .../test/microbench/btree/IntVisitor.java  |   85 +
 .../test/microbench/btree/Megamorphism.java|  169 +
 .../cassandra/utils/btree/BTreeRemovalTest.java|   17 +-
 .../utils/btree/BTreeSearchIteratorTest.java   |6 +-
 .../apache/cassandra/utils/btree/BTreeTest.java|  239 +-
 26 files changed, 4712 insertions(+), 1507 deletions(-)
 create mode 100644 src/java/org/apache/cassandra/utils/BulkIterator.java
 delete mode 100644 src/java/org/apache/cassandra/utils/btree/NodeBuilder.java
 delete mode 100644 src/java/org/apache/cassandra/utils/btree/TreeBuilder.java
 create mode 100644 
src/java/org/apache/cassandra/utils/caching/TinyThreadLocalPool.java
 copy 
test/microbench/org/apache/cassandra/test/microbench/{BTreeBuildBench.java => 
btree/BTreeBench.java} (54%)
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeBuildBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeTransformBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/BTreeUpdateBench.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/IntVisitor.java
 create mode 100644 
test/microbench/org/apache/cassandra/test/microbench/btree/Megamorphism.java


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



[cassandra] branch cassandra-4.0 updated (f3123a6 -> e773bbd)

2022-03-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from f3123a6  remove futures module requirement from pylib
 add e773bbd  Reject snapshot names with special character

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|   1 +
 .../apache/cassandra/tools/nodetool/Snapshot.java  |   5 +
 .../cassandra/tools/nodetool/SnapshotTest.java | 152 +
 3 files changed, 158 insertions(+)
 create mode 100644 
test/unit/org/apache/cassandra/tools/nodetool/SnapshotTest.java

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



[cassandra] branch trunk updated (96cecdb -> 34a7eba)

2022-03-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from 96cecdb  Increase cqlsh version to 6.1.0
 add e773bbd  Reject snapshot names with special character
 new 34a7eba  Merge branch cassandra-4.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 +
 .../apache/cassandra/tools/nodetool/Snapshot.java  |  19 ++-
 .../cassandra/tools/nodetool/SnapshotTest.java | 169 +
 3 files changed, 182 insertions(+), 7 deletions(-)
 create mode 100644 
test/unit/org/apache/cassandra/tools/nodetool/SnapshotTest.java

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



[cassandra] 01/01: Merge branch cassandra-4.0 into trunk

2022-03-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 34a7eba4b8d1813ad782fe2432cdfd85fa24e6c1
Merge: 96cecdb e773bbd
Author: Benjamin Lerer 
AuthorDate: Fri Mar 18 15:03:38 2022 +0100

Merge branch cassandra-4.0 into trunk

 CHANGES.txt|   1 +
 .../apache/cassandra/tools/nodetool/Snapshot.java  |  19 ++-
 .../cassandra/tools/nodetool/SnapshotTest.java | 169 +
 3 files changed, 182 insertions(+), 7 deletions(-)

diff --cc CHANGES.txt
index e2575ff,5c0477b..22f4759
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,113 -1,5 +1,114 @@@
 -4.0.4
 +4.1
 + * Increase cqlsh version (CASSANDRA-17432)
 + * Update SUPPORTED_UPGRADE_PATHS to include 3.0 and 3.x to 4.1 paths and 
remove obsolete tests (CASSANDRA-17362)
 + * Support DELETE in CQLSSTableWriter (CASSANDRA-14797)
 + * Failed inbound internode authentication failures generate ugly warning 
with stack trace (CASSANDRA-17068)
 + * Expose gossip information in system_views.gossip_info virtual table 
(CASSANDRA-17002)
 + * Add guardrails for collection items and size (CASSANDRA-17153)
 + * Improve guardrails messages (CASSANDRA-17430)
 + * Remove all usages of junit.framework and ban them via Checkstyle 
(CASSANDRA-17316)
 + * Add guardrails for read/write consistency levels (CASSANDRA-17188)
 + * Add guardrail for SELECT IN terms and their cartesian product 
(CASSANDRA-17187)
 + * remove unused imports in cqlsh.py and cqlshlib (CASSANDRA-17413)
 + * deprecate property windows_timer_interval (CASSANDRA-17404)
 + * Expose streaming as a vtable (CASSANDRA-17390)
 + * Expose all client options via system_views.clients and nodetool 
clientstats (CASSANDRA-16378)
 + * Make startup checks configurable (CASSANDRA-17220)
 + * Add guardrail for number of partition keys on IN queries (CASSANDRA-17186)
 + * update Python test framework from nose to pytest (CASSANDRA-17293)
 + * Fix improper CDC commit log segments deletion in non-blocking mode 
(CASSANDRA-17233)
 + * Add support for string concatenations through the + operator 
(CASSANDRA-17190)
 + * Limit the maximum hints size per host (CASSANDRA-17142)
 + * Add a virtual table for exposing batch metrics (CASSANDRA-17225)
 + * Flatten guardrails config (CASSANDRA-17353)
 + * Instance failed to start up due to NPE in 
StartupClusterConnectivityChecker (CASSANDRA-17347)
 + * add the shorter version of version flag (-v) in cqlsh (CASSANDRA-17236)
 + * Make vtables accessible via internode messaging (CASSANDRA-17295)
 + * Add support for PEM based key material for SSL (CASSANDRA-17031)
 + * Standardize storage configuration parameters' names. Support unit 
suffixes. (CASSANDRA-15234)
 + * Remove support for Windows (CASSANDRA-16956)
 + * Runtime-configurable YAML option to prohibit USE statements 
(CASSANDRA-17318)
 + * When streaming sees a ClosedChannelException this triggers the disk 
failure policy (CASSANDRA-17116)
 + * Add a virtual table for exposing prepared statements metrics 
(CASSANDRA-17224)
 + * Remove python 2.x support from cqlsh (CASSANDRA-17242)
 + * Prewarm role and credential caches to avoid timeouts at startup 
(CASSANDRA-16958)
 + * Make capacity/validity/updateinterval/activeupdate for Auth Caches 
configurable via nodetool (CASSANDRA-17063)
 + * Added startup check for read_ahead_kb setting (CASSANDRA-16436)
 + * Avoid unecessary array allocations and initializations when performing 
query checks (CASSANDRA-17209)
 + * Add guardrail for list operations that require read before write 
(CASSANDRA-17154)
 + * Migrate thresholds for number of keyspaces and tables to guardrails 
(CASSANDRA-17195)
 + * Remove self-reference in SSTableTidier (CASSANDRA-17205)
 + * Add guardrail for query page size (CASSANDRA-17189)
 + * Allow column_index_size_in_kb to be configurable through nodetool 
(CASSANDRA-17121)
 + * Emit a metric for number of local read and write calls
 + * Add non-blocking mode for CDC writes (CASSANDRA-17001)
 + * Add guardrails framework (CASSANDRA-17147)
 + * Harden resource management on SSTable components to prevent future leaks 
(CASSANDRA-17174)
 + * Make nodes more resilient to local unrelated files during startup 
(CASSANDRA-17082)
 + * repair prepare message would produce a wrong error message if network 
timeout happened rather than reply wait timeout (CASSANDRA-16992)
 + * Log queries that fail on timeout or unavailable errors up to once per 
minute by default (CASSANDRA-17159)
 + * Refactor normal/preview/IR repair to standardize repair cleanup and error 
handling of failed RepairJobs (CASSANDRA-17069)
 + * Log missing peers in StartupClusterConnectivityChecker (CASSANDRA-17130)
 + * Introduce separate rate limiting settings for entire SSTable streaming 
(CASSANDRA-17065)
 + * Implement Virtual Tables for Auth Caches (CASSANDRA-16914)
 + * Actively update auth cache in the background (CASSANDRA-16957

[cassandra-website] branch asf-site updated (f2b1412 -> ccac41f)

2022-02-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cassandra-website.git.


 discard f2b1412  generate docs for 03bdf7ac
 add e98ea99  February 2022 blog "Behind the scenes of an Apache Cassandra 
Release"
 add ccac41f  generate docs for e98ea999

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f2b1412)
\
 N -- N -- N   refs/heads/asf-site (ccac41f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 ...ache-cassandra-release-unsplash-lajos-szabo.jpg | Bin 0 -> 1756830 bytes
 content/_/blog.html|  24 +++
 ...the-scenes-of-an-Apache-Cassandra-Release.html} |  73 +++--
 content/search-index.js|   2 +-
 ...ache-cassandra-release-unsplash-lajos-szabo.jpg | Bin 0 -> 1756830 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +++
 ...-the-scenes-of-an-Apache-Cassandra-Release.adoc |  45 +
 site-ui/build/ui-bundle.zip| Bin 4740084 -> 4740084 
bytes
 8 files changed, 131 insertions(+), 37 deletions(-)
 create mode 100644 
content/_/_images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
 copy content/_/blog/{World-Party.html => 
Behind-the-scenes-of-an-Apache-Cassandra-Release.html} (65%)
 create mode 100644 
site-content/source/modules/ROOT/images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
 create mode 100644 
site-content/source/modules/ROOT/pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc

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



[cassandra-website] branch trunk updated (95bccf5 -> e98ea99)

2022-02-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


omit 95bccf5  February 2022 blog "Behind the scenes of an Apache Cassandra 
Release"
 new e98ea99  February 2022 blog "Behind the scenes of an Apache Cassandra 
Release"

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (95bccf5)
\
 N -- N -- N   refs/heads/trunk (e98ea99)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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:
 site-content/source/modules/ROOT/pages/blog.adoc| 2 +-
 .../pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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



[cassandra-website] 01/01: February 2022 blog "Behind the scenes of an Apache Cassandra Release"

2022-02-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit e98ea999abd4d2eac1179715509fcb7e30210d02
Author: Diogenese Topper 
AuthorDate: Tue Feb 15 12:28:18 2022 -0800

February 2022 blog "Behind the scenes of an Apache Cassandra Release"

patch by Josh McKenzie, Diogenese Topper; review by Erick Ramirez  for 
CASSANDRA-17384
---
 ...ache-cassandra-release-unsplash-lajos-szabo.jpg | Bin 0 -> 1756830 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +++
 ...-the-scenes-of-an-Apache-Cassandra-Release.adoc |  45 +
 3 files changed, 69 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
 
b/site-content/source/modules/ROOT/images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
new file mode 100644
index 000..ebefee2
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 2523451..946af0f 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Behind the scenes of an Apache Cassandra Release
+[discrete]
+ February 18, 2022
+--
+[openblock,card-content]
+--
+Formalizing how we balance the need to evolve and provide cutting-edge 
features with long-term stability. The simple rules we use to decide when to 
merge and why we’ll be supporting three GA releases going forward, but why 
we’ve decided to support four releases for the next cycle.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Tightening Security for Apache Cassandra: Part 3
 [discrete]
  February 14, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc
new file mode 100644
index 000..37b9497
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc
@@ -0,0 +1,45 @@
+= Behind the scenes of an Apache Cassandra Release
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: February, 18 2021
+:page-post-author: Josh McKenzie
+:description: The Apache Cassandra Community
+:keywords:
+
+:!figure-caption:
+
+.Image credit: https://unsplash.com/@lou_szabo[Lajos Szabo on Unsplash^]
+image::blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg[Forklift
 delivering a crate]
+
+== Behind the scenes of an Apache Cassandra Release
+
+When developing a mission-critical piece of infrastructure software used 
broadly worldwide, it’s critical to have alignment and clarity around 
modifications to LTS releases. Balancing the need to evolve and provide 
cutting-edge novel features with providing long-term stability is a challenge 
we’ve faced for years on the Apache Cassandra project. As the topic came up 
again on a specific JIRA ticket: 
https://issues.apache.org/jira/browse/CASSANDRA-16873[CASSANDRA-16873^], we 
took the oppor [...]
+
+As projects evolve, often tribal knowledge is passed down from developer to 
developer over the years via IRC or Slack. What we see with maturing, widely 
adopted software projects, like Apache Cassandra, is that the needs of our 
users likewise evolve, as does the level of rigor and emphasis on stability 
required from our releases. Human nature is to understand the rules of a system 
and then optimize within those bounds based on goals and incentives, so when 
formalizing our processes we kn [...]
+
+We have formalized our merge heuristics on the following Simple Rules:
+
+* This is a widely used mission-critical database; stability and correctness 
are table stakes
+* For patch fix releases on a GA branch, prioritize stability (Bug Fix Only)
+* For a Minor release, prioritize introducing new, non-API changing, and 
non-default behavior breaking features and changes (Bug Fix, Improvements, New 
Features)
+* Defer disruptive changes (API changes, protocol changes, etc.) to Major 
releases (All ticket types)
+
+We use Semantic Versioning (https://semver.org/[semver^]) on the project, 
which leads to releases with the MAJOR.MINOR.PATCH release structure. The 
Cassandra development community has committed to supporting thre

[cassandra-website] branch trunk updated: February 2022 blog "Behind the scenes of an Apache Cassandra Release"

2022-02-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 95bccf5  February 2022 blog "Behind the scenes of an Apache Cassandra 
Release"
95bccf5 is described below

commit 95bccf5b903c6325b52ed2f1db823f42376f65f7
Author: Diogenese Topper 
AuthorDate: Tue Feb 15 12:28:18 2022 -0800

February 2022 blog "Behind the scenes of an Apache Cassandra Release"

patch by Josh McKenzie, Diogenese Topper; review by Erick Ramirez  for 
CASSANDRA-17384
---
 ...ache-cassandra-release-unsplash-lajos-szabo.jpg | Bin 0 -> 1756830 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +++
 ...-the-scenes-of-an-Apache-Cassandra-Release.adoc |  45 +
 3 files changed, 69 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
 
b/site-content/source/modules/ROOT/images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
new file mode 100644
index 000..ebefee2
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 2523451..07f35fa 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Behind the scenes of an Apache Cassandra Release
+[discrete]
+ February 17, 2022
+--
+[openblock,card-content]
+--
+Formalizing how we balance the need to evolve and provide cutting-edge 
features with long-term stability. The simple rules we use to decide when to 
merge and why we’ll be supporting three GA releases going forward, but why 
we’ve decided to support four releases for the next cycle.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Tightening Security for Apache Cassandra: Part 3
 [discrete]
  February 14, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc
new file mode 100644
index 000..cea84e4
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Behind-the-scenes-of-an-Apache-Cassandra-Release.adoc
@@ -0,0 +1,45 @@
+= Behind the scenes of an Apache Cassandra Release
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: February, 17 2021
+:page-post-author: Josh McKenzie
+:description: The Apache Cassandra Community
+:keywords:
+
+:!figure-caption:
+
+.Image credit: https://unsplash.com/@lou_szabo[Lajos Szabo on Unsplash^]
+image::blog/behind-the-scenes-of-an-apache-cassandra-release-unsplash-lajos-szabo.jpg[Forklift
 delivering a crate]
+
+== Behind the scenes of an Apache Cassandra Release
+
+When developing a mission-critical piece of infrastructure software used 
broadly worldwide, it’s critical to have alignment and clarity around 
modifications to LTS releases. Balancing the need to evolve and provide 
cutting-edge novel features with providing long-term stability is a challenge 
we’ve faced for years on the Apache Cassandra project. As the topic came up 
again on a specific JIRA ticket: 
https://issues.apache.org/jira/browse/CASSANDRA-16873[CASSANDRA-16873^], we 
took the oppor [...]
+
+As projects evolve, often tribal knowledge is passed down from developer to 
developer over the years via IRC or Slack. What we see with maturing, widely 
adopted software projects, like Apache Cassandra, is that the needs of our 
users likewise evolve, as does the level of rigor and emphasis on stability 
required from our releases. Human nature is to understand the rules of a system 
and then optimize within those bounds based on goals and incentives, so when 
formalizing our processes we kn [...]
+
+We have formalized our merge heuristics on the following Simple Rules:
+
+* This is a widely used mission-critical database; stability and correctness 
are table stakes
+* For patch fix releases on a GA branch, prioritize stability (Bug Fix Only)
+* For a Minor release, prioritize introducing new, non-API changing, and 
non-default behavior breaking features and changes (Bug Fix, Improvements, New 
Features)
+* Defer disruptive changes (API changes, protocol changes, etc.) to Major 
releases (All ticket types)
+
+We use Semantic Version

[cassandra-website] 01/01: February 2022 blog "Tightening Security for Apache Cassandra Part: 3"

2022-02-16 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit fbb538356c533feba1847fb5c51fe64c58907918
Author: Diogenese Topper 
AuthorDate: Thu Feb 10 19:00:05 2022 -0800

February 2022 blog "Tightening Security for Apache Cassandra Part: 3"

patch by Maulin Vasavada, Diogenese Topper; reviewed by Erick Ramirez for
CASSANDRA-17373

Add blog post titled "Tightening Security for Apache Cassandra Part: 3"
update blog index
add 2 images for blog: "Cassandra-SslContextFactory.png" and 
"tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg"
---
 .../images/blog/Cassandra-SslContextFactory.png| Bin 0 -> 33750 bytes
 ...che-cassandra-p3-unsplash-jennefer-zacarias.jpg | Bin 0 -> 1658871 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +
 ...ening-Security-for-Apache-Cassandra-Part-3.adoc |  97 +
 4 files changed, 121 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/Cassandra-SslContextFactory.png 
b/site-content/source/modules/ROOT/images/blog/Cassandra-SslContextFactory.png
new file mode 100644
index 000..872f0a4
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/Cassandra-SslContextFactory.png 
differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
 
b/site-content/source/modules/ROOT/images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
new file mode 100644
index 000..b708d58
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index d039eff..2523451 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Tightening Security for Apache Cassandra: Part 3
+[discrete]
+ February 14, 2022
+--
+[openblock,card-content]
+--
+In Part 3 of Maulin Vasavada’s mini-series on improving security, we detail 
how Cassandra 4.0 delivers ways to customize mTLS/TLS configuration while 
retaining the hot-reload functionality.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Apache Cassandra Changelog #12
 [discrete]
  February 10, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc
new file mode 100644
index 000..c8ac3fb
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc
@@ -0,0 +1,97 @@
+= Tightening security for Apache Cassandra: Part 3
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: February, 14 2022
+:page-post-author: Maulin Vasavada
+:description: The Apache Cassandra Community
+:keywords:
+
+:!figure-caption:
+
+.Image credit: https://unsplash.com/@zenchic[Jennefer Zacarias^]
+image::blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg[3-4]
+
+In xref:blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc[Part-2] of 
this series, we explored avenues for securing data in transit and described how 
to configure TLS/mTLS with Apache Cassandra 4.0. In Part 3, we’ll look at how 
you can customize TLS/mTLS for Apache Cassandra 4.0+ to overcome the challenges 
with a TLS configuration.
+
+=== How We Made TLS Configuration Better With 4.0
+
+With Apache Cassandra 4.0, 
https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-9%3A+Make+SSLContext+creation+pluggable[we
 enhanced^] the TLS/mTLS configuration to allow for specifying custom ways to 
build SSLContext and we provided a default implementation for backward 
compatibility. We introduced a new configuration, `ssl_context_factory`, where 
you can specify your custom class to build SSLContext objects required by 
Java/Netty SSL libraries. You can also add custom properties to [...]
+
+To demonstrate this customization, let’s use the example of Kubernetes, the 
popular cloud-native solution. Kubernetes allows configuring 
https://kubernetes.io/docs/concepts/configuration/secret/[Secrets^] to store 
sensitive data. We could potentially use K8s Secrets to store the keystore and 
truststore artifacts along with their respective password

[cassandra-website] branch trunk updated (a0fb0de -> fbb5383)

2022-02-16 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


omit a0fb0de  CASSANDRA-17373: February 2022 blog "Tightening Security for 
Apache Cassandra Part: 3"
 new fbb5383  February 2022 blog "Tightening Security for Apache Cassandra 
Part: 3"

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a0fb0de)
\
 N -- N -- N   refs/heads/trunk (fbb5383)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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:

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



[cassandra-website] branch asf-site updated (fec7fb2 -> 7525e6c)

2022-02-15 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cassandra-website.git.


 discard fec7fb2  ninja
 discard 56da4b9  generate docs for ee56da10
 add bb42048  Releases 3.0.26, 3.11.12, 4.0.2
 add a0fb0de  CASSANDRA-17373: February 2022 blog "Tightening Security for 
Apache Cassandra Part: 3"
 add 7525e6c  generate docs for a0fb0de1

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fec7fb2)
\
 N -- N -- N   refs/heads/asf-site (7525e6c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../_/_images/blog/Cassandra-SslContextFactory.png | Bin 0 -> 33750 bytes
 ...che-cassandra-p3-unsplash-jennefer-zacarias.jpg | Bin 0 -> 1658871 bytes
 content/_/blog.html|  24 +++
 ...ning-Security-for-Apache-Cassandra-Part-3.html} | 118 
 content/_/download.html|  52 ++---
 .../cassandra/configuration/cass_yaml_file.html| 211 -
 .../cassandra/configuration/cass_yaml_file.html| 211 -
 .../cassandra/configuration/cass_yaml_file.html| 211 -
 content/search-index.js|   2 +-
 .../images/blog/Cassandra-SslContextFactory.png| Bin 0 -> 33750 bytes
 ...che-cassandra-p3-unsplash-jennefer-zacarias.jpg | Bin 0 -> 1658871 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +++
 ...ening-Security-for-Apache-Cassandra-Part-3.adoc |  97 ++
 .../source/modules/ROOT/pages/download.adoc|  18 +-
 site-ui/build/ui-bundle.zip| Bin 4740084 -> 4740084 
bytes
 15 files changed, 880 insertions(+), 88 deletions(-)
 create mode 100644 content/_/_images/blog/Cassandra-SslContextFactory.png
 create mode 100644 
content/_/_images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
 copy content/_/blog/{Tightening-Security-for-Apache-Cassandra-Part-1.html => 
Tightening-Security-for-Apache-Cassandra-Part-3.html} (64%)
 create mode 100644 
site-content/source/modules/ROOT/images/blog/Cassandra-SslContextFactory.png
 create mode 100644 
site-content/source/modules/ROOT/images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
 create mode 100644 
site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc

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



[cassandra-website] branch trunk updated: CASSANDRA-17373: February 2022 blog "Tightening Security for Apache Cassandra Part: 3"

2022-02-15 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new a0fb0de  CASSANDRA-17373: February 2022 blog "Tightening Security for 
Apache Cassandra Part: 3"
a0fb0de is described below

commit a0fb0de12c70b2a4b2b27ca1196ae9598aa45db0
Author: Diogenese Topper 
AuthorDate: Thu Feb 10 19:00:05 2022 -0800

CASSANDRA-17373: February 2022 blog "Tightening Security for Apache 
Cassandra Part: 3"

patch by Maulin Vasavada, Diogenese Topper; review by Erick Ramirez

Add blog post titled "Tightening Security for Apache Cassandra Part: 3"
update blog index
add 2 images for blog: "Cassandra-SslContextFactory.png" and 
"tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg"
---
 .../images/blog/Cassandra-SslContextFactory.png| Bin 0 -> 33750 bytes
 ...che-cassandra-p3-unsplash-jennefer-zacarias.jpg | Bin 0 -> 1658871 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +
 ...ening-Security-for-Apache-Cassandra-Part-3.adoc |  97 +
 4 files changed, 121 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/Cassandra-SslContextFactory.png 
b/site-content/source/modules/ROOT/images/blog/Cassandra-SslContextFactory.png
new file mode 100644
index 000..872f0a4
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/Cassandra-SslContextFactory.png 
differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
 
b/site-content/source/modules/ROOT/images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
new file mode 100644
index 000..b708d58
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index d039eff..2523451 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Tightening Security for Apache Cassandra: Part 3
+[discrete]
+ February 14, 2022
+--
+[openblock,card-content]
+--
+In Part 3 of Maulin Vasavada’s mini-series on improving security, we detail 
how Cassandra 4.0 delivers ways to customize mTLS/TLS configuration while 
retaining the hot-reload functionality.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Apache Cassandra Changelog #12
 [discrete]
  February 10, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc
new file mode 100644
index 000..c8ac3fb
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-3.adoc
@@ -0,0 +1,97 @@
+= Tightening security for Apache Cassandra: Part 3
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: February, 14 2022
+:page-post-author: Maulin Vasavada
+:description: The Apache Cassandra Community
+:keywords:
+
+:!figure-caption:
+
+.Image credit: https://unsplash.com/@zenchic[Jennefer Zacarias^]
+image::blog/tightening-security-for-apache-cassandra-p3-unsplash-jennefer-zacarias.jpg[3-4]
+
+In xref:blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc[Part-2] of 
this series, we explored avenues for securing data in transit and described how 
to configure TLS/mTLS with Apache Cassandra 4.0. In Part 3, we’ll look at how 
you can customize TLS/mTLS for Apache Cassandra 4.0+ to overcome the challenges 
with a TLS configuration.
+
+=== How We Made TLS Configuration Better With 4.0
+
+With Apache Cassandra 4.0, 
https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-9%3A+Make+SSLContext+creation+pluggable[we
 enhanced^] the TLS/mTLS configuration to allow for specifying custom ways to 
build SSLContext and we provided a default implementation for backward 
compatibility. We introduced a new configuration, `ssl_context_factory`, where 
you can specify your custom class to build SSLContext objects required by 
Java/Netty SSL libraries. You can also add custom properties to [...]
+
+To demonstrate this customization, let’s use the example of Kubernetes, the 
popular cloud-native solution. Kubernetes allows configuring 
https://k

[cassandra-dtest] branch trunk updated: Take into account new contatenation support through the + operator

2022-02-11 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 049b1c0  Take into account new contatenation support through the + 
operator
049b1c0 is described below

commit 049b1c06aa35d6b10a0b3bab1a21d8c40a8ae4c0
Author: Manish Ghildiyal 
AuthorDate: Sat Jan 15 10:23:58 2022 +0100

Take into account new contatenation support through the + operator

Patch by Manish Ghildiyal; Review by Benjamin Lerer for CASSANDRA-17190
---
 user_functions_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/user_functions_test.py b/user_functions_test.py
index 4102352..24b2b1a 100644
--- a/user_functions_test.py
+++ b/user_functions_test.py
@@ -147,7 +147,7 @@ class TestUserFunctions(Tester):
 session.execute("CREATE OR REPLACE FUNCTION overloaded(v ascii) called 
on null input RETURNS text LANGUAGE java AS 'return \"f1\";'")
 
 # ensure that works with correct specificity
-assert_invalid(session, "SELECT v FROM tab WHERE k = 
overloaded('foo')")
+assert_none(session, "SELECT v FROM tab WHERE k = overloaded('foo')")
 assert_none(session, "SELECT v FROM tab WHERE k = overloaded((text) 
'foo')")
 assert_none(session, "SELECT v FROM tab WHERE k = overloaded((ascii) 
'foo')")
 assert_none(session, "SELECT v FROM tab WHERE k = overloaded((varchar) 
'foo')")

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



[cassandra] branch trunk updated: Add support for string concatenations through the + operator

2022-02-11 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 5cf62c6  Add support for string concatenations through the + operator
5cf62c6 is described below

commit 5cf62c6c02322505db9260d2aa9031386326fc75
Author: Manish Ghildiyal 
AuthorDate: Sat Dec 18 18:26:31 2021 +0100

Add support for string concatenations through the + operator

Patch by Manish Ghildiyal; review by Benjamin Lerer, Berenguer Blassi,
Brandon Williams for CASSANDRA-17190
---
 CHANGES.txt|  1 +
 NEWS.txt   |  1 +
 src/java/org/apache/cassandra/cql3/Constants.java  | 14 +++-
 .../cassandra/cql3/functions/OperationFcts.java| 92 ++
 .../apache/cassandra/db/marshal/StringType.java| 13 +++
 .../cql3/functions/OperationFctsTest.java  | 14 
 6 files changed, 118 insertions(+), 17 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 2a313ab..51e39bf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Add support for string concatenations through the + operator 
(CASSANDRA-17190)
  * Limit the maximum hints size per host (CASSANDRA-17142)
  * Add a virtual table for exposing batch metrics (CASSANDRA-17225)
  * Flatten guardrails config (CASSANDRA-17353)
diff --git a/NEWS.txt b/NEWS.txt
index f5d76d5..26a1c8d 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -38,6 +38,7 @@ using the provided 'sstableupgrade' tool.
 
 New features
 
+- Support for String concatenation has been added through the + operator.
 - New configuration max_hints_size_per_host to limit the size of local 
hints files per host in megabytes. Setting to
   non-positive value disables the limit, which is the default behavior. 
Setting to a positive value to ensure
   the total size of the hints files per host does not exceed the limit.
diff --git a/src/java/org/apache/cassandra/cql3/Constants.java 
b/src/java/org/apache/cassandra/cql3/Constants.java
index 3457e33..e8989ad 100644
--- a/src/java/org/apache/cassandra/cql3/Constants.java
+++ b/src/java/org/apache/cassandra/cql3/Constants.java
@@ -20,6 +20,7 @@ package org.apache.cassandra.cql3;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -44,7 +45,18 @@ public abstract class Constants
 
 public enum Type
 {
-STRING,
+STRING
+{
+public AbstractType getPreferedTypeFor(String text)
+{
+ if(Charset.forName("US-ASCII").newEncoder().canEncode(text))
+ {
+ return AsciiType.instance;
+ }
+
+ return UTF8Type.instance;
+}
+},
 INTEGER
 {
 public AbstractType getPreferedTypeFor(String text)
diff --git a/src/java/org/apache/cassandra/cql3/functions/OperationFcts.java 
b/src/java/org/apache/cassandra/cql3/functions/OperationFcts.java
index 4994660..b00ced7 100644
--- a/src/java/org/apache/cassandra/cql3/functions/OperationFcts.java
+++ b/src/java/org/apache/cassandra/cql3/functions/OperationFcts.java
@@ -53,14 +53,24 @@ public final class OperationFcts
 {
 return type.addDuration(temporal, duration);
 }
+
+@Override
+protected ByteBuffer excuteOnStrings(StringType resultType,
+ StringType leftType,
+ ByteBuffer left,
+ StringType rightType,
+ ByteBuffer right)
+{
+return resultType.concat(leftType, left, rightType, right);
+}
 },
 SUBSTRACTION('-', "_substract")
 {
 protected ByteBuffer executeOnNumerics(NumberType resultType,
- NumberType leftType,
- ByteBuffer left,
- NumberType rightType,
- ByteBuffer right)
+   NumberType leftType,
+   ByteBuffer left,
+   NumberType rightType,
+   ByteBuffer right)
 {
 return resultType.substract(leftType, left, rightType, right);
 }
@@ -76,10 +86,10 @@ public final class OperationFcts
 MULTIPLICATION('*', "_multiply")
 {
 protected ByteBuffer executeOn

[cassandra-website] branch asf-site updated (30eca23 -> 56da4b9)

2022-02-10 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cassandra-website.git.


 discard 30eca23  generate docs for 03f46031
 add 82f848e  Updated publish date for "Tightening Security Pt 2" blog to 
Feb 7
 add ee56da1  February 2022 blog post for "Apache Cassandra Changelog #12"
 add 56da4b9  generate docs for ee56da10

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (30eca23)
\
 N -- N -- N   refs/heads/asf-site (56da4b9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../blog/cassandra-documentation-changelog-12.png  | Bin 0 -> 1732984 bytes
 content/_/blog.html|  26 -
 ...ache-Cassandra-Changelog-12-February-2022.html} | 117 ++---
 ...ening-Security-for-Apache-Cassandra-Part-2.html |   2 +-
 content/search-index.js|   2 +-
 .../blog/cassandra-documentation-changelog-12.png  | Bin 0 -> 1732984 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  26 -
 ...pache-Cassandra-Changelog-12-February-2022.adoc |  93 
 ...ening-Security-for-Apache-Cassandra-Part-2.adoc |   2 +-
 site-ui/build/ui-bundle.zip| Bin 4740084 -> 4740084 
bytes
 10 files changed, 201 insertions(+), 67 deletions(-)
 create mode 100644 
content/_/_images/blog/cassandra-documentation-changelog-12.png
 copy content/_/blog/{Apache-Cassandra-Changelog-1-October-2020.html => 
Apache-Cassandra-Changelog-12-February-2022.html} (61%)
 create mode 100644 
site-content/source/modules/ROOT/images/blog/cassandra-documentation-changelog-12.png
 create mode 100644 
site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-12-February-2022.adoc

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



[cassandra] branch trunk updated: Add a virtual table for exposing batch metrics

2022-02-10 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new ce7502a  Add a virtual table for exposing batch metrics
ce7502a is described below

commit ce7502a11067ef903cba24ad588cf0a5b9da9257
Author: Michael Burman 
AuthorDate: Thu Dec 23 21:01:09 2021 +0200

Add a virtual table for exposing batch metrics

Patch by Michael Burman; review by Aleksei Zotov, Benjamin Lerer and 
Ekaterina Dimitrova for CASSANDRA-17225
---
 CHANGES.txt|  1 +
 .../cassandra/db/virtual/BatchMetricsTable.java| 75 ++
 .../cassandra/db/virtual/SystemViewsKeyspace.java  |  1 +
 .../db/virtual/BatchMetricsTableTest.java  | 90 ++
 4 files changed, 167 insertions(+)

diff --git a/CHANGES.txt b/CHANGES.txt
index d3808db..74524cf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Add a virtual table for exposing batch metrics (CASSANDRA-17225)
  * Flatten guardrails config (CASSANDRA-17353)
  * Instance failed to start up due to NPE in StartupClusterConnectivityChecker 
(CASSANDRA-17347)
  * add the shorter version of version flag (-v) in cqlsh (CASSANDRA-17236)
diff --git a/src/java/org/apache/cassandra/db/virtual/BatchMetricsTable.java 
b/src/java/org/apache/cassandra/db/virtual/BatchMetricsTable.java
new file mode 100644
index 000..948f2a1
--- /dev/null
+++ b/src/java/org/apache/cassandra/db/virtual/BatchMetricsTable.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.db.virtual;
+
+import com.codahale.metrics.Snapshot;
+import org.apache.cassandra.cql3.statements.BatchStatement;
+import org.apache.cassandra.db.marshal.DoubleType;
+import org.apache.cassandra.db.marshal.LongType;
+import org.apache.cassandra.db.marshal.UTF8Type;
+import org.apache.cassandra.dht.LocalPartitioner;
+import org.apache.cassandra.metrics.BatchMetrics;
+import org.apache.cassandra.schema.TableMetadata;
+
+public class BatchMetricsTable extends AbstractVirtualTable
+{
+
+private static final String PARTITIONS_PER_LOGGED_BATCH = 
"partitions_per_logged_batch";
+private static final String PARTITIONS_PER_UNLOGGED_BATCH = 
"partitions_per_unlogged_batch";
+private static final String PARTITIONS_PER_COUNTER_BATCH = 
"partitions_per_counter_batch";
+private final static String P50 = "p50th";
+private final static String P99 = "p99th";
+private final static String P999 = "p999th";
+private final static String MAX = "max";
+
+BatchMetricsTable(String keyspace)
+{
+super(TableMetadata.builder(keyspace, "batch_metrics")
+   .comment("Metrics specific to batch statements")
+   .kind(TableMetadata.Kind.VIRTUAL)
+   .partitioner(new 
LocalPartitioner(UTF8Type.instance))
+   .addPartitionKeyColumn("name", UTF8Type.instance)
+   .addRegularColumn(P50, DoubleType.instance)
+   .addRegularColumn(P99, DoubleType.instance)
+   .addRegularColumn(P999, DoubleType.instance)
+   .addRegularColumn(MAX, LongType.instance)
+   .build());
+}
+
+@Override
+public DataSet data()
+{
+SimpleDataSet result = new SimpleDataSet(metadata());
+BatchMetrics metrics = BatchStatement.metrics;
+addRow(result, PARTITIONS_PER_LOGGED_BATCH, 
metrics.partitionsPerLoggedBatch.getSnapshot());
+addRow(result, PARTITIONS_PER_UNLOGGED_BATCH, 
metrics.partitionsPerUnloggedBatch.getSnapshot());
+addRow(result, PARTITIONS_PER_COUNTER_BATCH, 
metrics.partitionsPerCounterBatch.getSnapshot());
+
+return result;
+}
+
+private void addRow(SimpleDataSet dataSet, String name, Snapshot snapshot)
+{
+dataSet.row(name)
+   .c

[cassandra-website] 02/02: February 2022 blog post for "Apache Cassandra Changelog #12"

2022-02-09 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit ee56da1056fcc76bd4dc23a8ac1204dc4e815677
Author: Diogenese Topper 
AuthorDate: Mon Feb 7 15:39:46 2022 -0800

February 2022 blog post for "Apache Cassandra Changelog #12"

Add blog post titled "Apache Cassandra Changelog 12"
Add image for blog
Modify blog index

patch by Diogenese Topper; review by Erick Ramirez for CASSANDRA-17356

Co-authored-by: Erick Ramirez 
---
 .../blog/cassandra-documentation-changelog-12.png  | Bin 0 -> 1732984 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 ++
 ...pache-Cassandra-Changelog-12-February-2022.adoc |  93 +
 3 files changed, 117 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/cassandra-documentation-changelog-12.png
 
b/site-content/source/modules/ROOT/images/blog/cassandra-documentation-changelog-12.png
new file mode 100644
index 000..86ad4b1
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/cassandra-documentation-changelog-12.png
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 31bd3fa..d039eff 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Apache Cassandra Changelog #12
+[discrete]
+ February 10, 2022
+--
+[openblock,card-content]
+--
+A new Build Lead role is announced. Ideas are requested for Google Summer of 
Code, and the Future of UDF is defined. Cassandra’s CI process is formalized 
and a Trie Memtable Implementation is discussed.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Apache-Cassandra-Changelog-12-February-2022.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Tightening Security for Apache Cassandra: Part 2
 [discrete]
  February 7, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-12-February-2022.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-12-February-2022.adoc
new file mode 100644
index 000..7208589
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-12-February-2022.adoc
@@ -0,0 +1,93 @@
+= Apache Cassandra Changelog #12
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: February 10, 2022
+:page-post-author: The Apache Cassandra Community
+:description: The Apache Cassandra Community
+:keywords: 
+
+image::blog/changelog_header.jpg[Apache Cassandra Changelog]
+Our monthly roundup of key activities and knowledge to keep the community 
informed.
+
+= Release Notes
+
+=== Release
+
+Available since 7th September, the latest release of Apache Cassandra is  
https://www.apache.org/dyn/closer.lua/cassandra/4.0.1/[4.0.1^], 
(https://downloads.apache.org/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz.asc[pgp^],
  
https://downloads.apache.org/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz.sha256[sha256^],
 and 
https://archive.apache.org/dist/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz.sha512[sha512^]).
 This was a rapid release to fix a https://issues.apache.org/ji [...]
+
+Note: As the docs are not yet updated, the bintray location for Debian users 
is replaced with the https://apache.jfrog.io/artifactory/cassandra/[ASF's JFrog 
Artifactory location^].
+
+See the xref:download.adoc[download section] for the latest stable and older 
supported versions of source and binary distributions.
+
+To stay up-to-date, we recommend joining the Cassandra 
xref:community.adoc#discussions[mailing list].
+
+== Community Notes
+
+_Updates on Cassandra Enhancement Proposals (CEPs), how to contribute, and 
other community activities._
+
+_Are you new to the project?  We have a handy 
xref:development/index.adoc[‘Contributing to Cassandra’] page on how to get 
involved and get started. Additionally, we have established two quick labels 
you should take a look at if you are new to the project. One is for 
https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=496=2252[“Failing
 Tests”^] and the other corresponds to our 
https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=484=2162[“Low
 [...]
+
+Read PMC member Josh McKenzie’s 
https://lists.apache.org/thread/pclo1tpqsfkc4skxhftrydos89o1t72q[latest 
bi-weekly update^] for ongoing discussions and the latest on ticket progress.
+
+=== Added
+
+A massive thank you goes to *Lorina Poland* for converting all the Cassandra 
documentation from reStructuredText to AsciiDoc for the new website and another 
heartfelt thank 

[cassandra-website] branch trunk updated (03f4603 -> ee56da1)

2022-02-09 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from 03f4603  February 2022 blog "Tightening Security for Apache Cassandra 
Part: 2"
 new 82f848e  Updated publish date for "Tightening Security Pt 2" blog to 
Feb 7
 new ee56da1  February 2022 blog post for "Apache Cassandra Changelog #12"

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:
 .../blog/cassandra-documentation-changelog-12.png  | Bin 0 -> 1732984 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  26 +-
 ...pache-Cassandra-Changelog-12-February-2022.adoc |  93 +
 ...ening-Security-for-Apache-Cassandra-Part-2.adoc |   2 +-
 4 files changed, 119 insertions(+), 2 deletions(-)
 create mode 100644 
site-content/source/modules/ROOT/images/blog/cassandra-documentation-changelog-12.png
 create mode 100644 
site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-12-February-2022.adoc

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



[cassandra-website] 01/02: Updated publish date for "Tightening Security Pt 2" blog to Feb 7

2022-02-09 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 82f848eca138e0f383ea4fb24ac7c20f63c56223
Author: Diogenese Topper 
AuthorDate: Mon Feb 7 13:10:04 2022 -0800

Updated publish date for "Tightening Security Pt 2" blog to Feb 7

patch by Diogenese Topper; review by Erick Ramirez for CASSANDRA-17360
---
 site-content/source/modules/ROOT/pages/blog.adoc| 2 +-
 .../pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 87f608c..31bd3fa 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -16,7 +16,7 @@ NOTES FOR CONTENT CREATORS
 [discrete]
 === Tightening Security for Apache Cassandra: Part 2
 [discrete]
- February 4, 2022
+ February 7, 2022
 --
 [openblock,card-content]
 --
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc
index 8752c64..719c2a6 100644
--- 
a/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc
+++ 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc
@@ -1,7 +1,7 @@
 = Tightening security for Apache Cassandra: Part 2
 :page-layout: single-post
 :page-role: blog-post
-:page-post-date: February, 4 2022
+:page-post-date: February, 7 2022
 :page-post-author: Maulin Vasavada
 :description: The Apache Cassandra Community
 

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



[cassandra] branch trunk updated: Fix classpath file creation for eclipse

2022-02-09 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 6d7b0a1  Fix classpath file creation for eclipse
6d7b0a1 is described below

commit 6d7b0a10796cfedd11c4a7a1de81bc48bf8ea3cc
Author: Yash Ladha 
AuthorDate: Wed Jan 26 09:30:42 2022 +0530

Fix classpath file creation for eclipse

Patch by Yash Ladha; reviewed by Benjamin Lerer and Berenguer Blasi for 
CASSANDRA-17294

When building the eclipse file for development, `.classpath` file was
not correctly generated as it was not getting closed. Also there were
missing third-party libs that were essential for development.

This commit fixes the generation of classpath for
`generate-eclipse-files` command.
---
 build.xml | 37 ++---
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/build.xml b/build.xml
index 67a758c..07c4057 100644
--- a/build.xml
+++ b/build.xml
@@ -2111,7 +2111,24 @@
   
 ]]>
 
-   

-   
-
-   
- 
-
-   
-
- 
-
- 
-   
-   
-  
+
 
 
 
 
-
+
 
   
 

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



[cassandra-website] branch asf-site updated (dcfbd1c -> 30eca23)

2022-02-07 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cassandra-website.git.


 discard dcfbd1c  generate docs for 4ca2e248
 add 03f4603  February 2022 blog "Tightening Security for Apache Cassandra 
Part: 2"
 add 30eca23  generate docs for 03f46031

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (dcfbd1c)
\
 N -- N -- N   refs/heads/asf-site (30eca23)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../tightening-security-p2-unsplash-parado.jpg | Bin 0 -> 380748 bytes
 content/_/blog.html|  24 +
 ...ning-Security-for-Apache-Cassandra-Part-2.html} | 175 +++
 .../cassandra/configuration/cass_yaml_file.html| 577 +++--
 content/doc/4.1/cassandra/operating/security.html  |   6 +-
 .../4.1/cassandra/tools/nodetool/bootstrap.html|   8 +-
 .../tools/nodetool/getcompactionthroughput.html|   2 +-
 .../tools/nodetool/getinterdcstreamthroughput.html |   2 +-
 .../tools/nodetool/getstreamthroughput.html|   4 +-
 .../doc/4.1/cassandra/tools/nodetool/nodetool.html |  22 +-
 .../4.1/cassandra/tools/nodetool/repair_admin.html |  75 ++-
 .../tools/nodetool/setbatchlogreplaythrottle.html  |   2 +-
 .../tools/nodetool/setcompactionthroughput.html|   4 +-
 .../tools/nodetool/sethintedhandoffthrottlekb.html |   4 +-
 .../tools/nodetool/setinterdcstreamthroughput.html |   4 +-
 .../tools/nodetool/setstreamthroughput.html|   6 +-
 .../cassandra/configuration/cass_yaml_file.html| 577 +++--
 .../doc/latest/cassandra/operating/security.html   |   6 +-
 .../latest/cassandra/tools/nodetool/bootstrap.html |   8 +-
 .../tools/nodetool/getcompactionthroughput.html|   2 +-
 .../tools/nodetool/getinterdcstreamthroughput.html |   2 +-
 .../tools/nodetool/getstreamthroughput.html|   4 +-
 .../latest/cassandra/tools/nodetool/nodetool.html  |  22 +-
 .../cassandra/tools/nodetool/repair_admin.html |  75 ++-
 .../tools/nodetool/setbatchlogreplaythrottle.html  |   2 +-
 .../tools/nodetool/setcompactionthroughput.html|   4 +-
 .../tools/nodetool/sethintedhandoffthrottlekb.html |   4 +-
 .../tools/nodetool/setinterdcstreamthroughput.html |   4 +-
 .../tools/nodetool/setstreamthroughput.html|   6 +-
 .../cassandra/configuration/cass_yaml_file.html| 577 +++--
 .../doc/trunk/cassandra/operating/security.html|   6 +-
 .../trunk/cassandra/tools/nodetool/bootstrap.html  |   8 +-
 .../tools/nodetool/getcompactionthroughput.html|   2 +-
 .../tools/nodetool/getinterdcstreamthroughput.html |   2 +-
 .../tools/nodetool/getstreamthroughput.html|   4 +-
 .../trunk/cassandra/tools/nodetool/nodetool.html   |  22 +-
 .../cassandra/tools/nodetool/repair_admin.html |  75 ++-
 .../tools/nodetool/setbatchlogreplaythrottle.html  |   2 +-
 .../tools/nodetool/setcompactionthroughput.html|   4 +-
 .../tools/nodetool/sethintedhandoffthrottlekb.html |   4 +-
 .../tools/nodetool/setinterdcstreamthroughput.html |   4 +-
 .../tools/nodetool/setstreamthroughput.html|   6 +-
 content/search-index.js|   2 +-
 .../tightening-security-p2-unsplash-parado.jpg | Bin 0 -> 380748 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +
 ...ening-Security-for-Apache-Cassandra-Part-2.adoc |  96 
 site-ui/build/ui-bundle.zip| Bin 4740084 -> 4740084 
bytes
 47 files changed, 1310 insertions(+), 1159 deletions(-)
 create mode 100644 
content/_/_images/blog/tightening-security-p2-unsplash-parado.jpg
 copy content/_/blog/{Reaper-Anti-entropy-Repair-Made-Easy.html => 
Tightening-Security-for-Apache-Cassandra-Part-2.html} (59%)
 create mode 100644 
site-content/source/modules/ROOT/images/blog/tightening-security-p2-unsplash-parado.jpg
 create mode 100644 
site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc

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



[cassandra-website] branch trunk updated: February 2022 blog "Tightening Security for Apache Cassandra Part: 2"

2022-02-07 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 03f4603  February 2022 blog "Tightening Security for Apache Cassandra 
Part: 2"
03f4603 is described below

commit 03f46031fa6b12fafe7812fae9d7dab8fa22f744
Author: Diogenese Topper 
AuthorDate: Wed Feb 2 10:24:36 2022 -0800

February 2022 blog "Tightening Security for Apache Cassandra Part: 2"

patch by Maulin Vasavada, Diogenese Topper; reviewed by Erick Ramirez for
CASSANDRA-17343

Add blog post titled "Tightening Security for Apache Cassandra Part: 2"
update blog index
add image for blog
patch by Maulin Vasavada, Diogenese Topper
---
 .../tightening-security-p2-unsplash-parado.jpg | Bin 0 -> 380748 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 ++
 ...ening-Security-for-Apache-Cassandra-Part-2.adoc |  96 +
 3 files changed, 120 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/tightening-security-p2-unsplash-parado.jpg
 
b/site-content/source/modules/ROOT/images/blog/tightening-security-p2-unsplash-parado.jpg
new file mode 100644
index 000..6007e57
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/tightening-security-p2-unsplash-parado.jpg
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index a848978..87f608c 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Tightening Security for Apache Cassandra: Part 2
+[discrete]
+ February 4, 2022
+--
+[openblock,card-content]
+--
+Part 2 of Maulin Vasavada’s mini-series covers how to secure data in transit 
using TLS/mTLS, configure TLS/mTLS properly, and the challenges before the 
release of Apache Cassandra 4.0.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Tightening Security for Apache Cassandra: Part 1
 [discrete]
  January 31, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc
new file mode 100644
index 000..8752c64
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-2.adoc
@@ -0,0 +1,96 @@
+= Tightening security for Apache Cassandra: Part 2
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: February, 4 2022
+:page-post-author: Maulin Vasavada
+:description: The Apache Cassandra Community
+
+image::blog/tightening-security-p2-unsplash-parado.jpg[blurred arrows of 
light on a highway]
+
+Image credit: Photo by https://unsplash.com/@parado[躺着的诗人 on Unsplash^]
+
+In xref:blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc[Part 1], we 
discussed how the growth in e-commerce transactions globally has required more 
secure software and one avenue to pursue securing data in transit is TLS/mTLS. 
This time we will discuss the challenges of TLS/mTLS, how it's configured, and 
what Apache Cassandra offered before the latest release, version 4.0.
+
+=== Challenges involved in TLS/mTLS
+
+We need to consider several operational challenges when using TLS/mTLS. As a 
note, we will refer to private/public keys, certificates, and passwords as 
‘security credentials’ in the remainder of the article.
+
+ Storing private key and password
+
+In the same way you need to consider keeping the key safe to your bank deposit 
box, storing long-lived security credentials on the filesystem poses 
significant risks. The implications of compromised or lost credentials are 
severe, although you can use filesystem permissions to buy yourself time to 
apply a better solution. As key distribution is a challenging problem, Apache 
Cassandra assumes that you already have a secure way to distribute those 
credentials to your Cassandra machines.
+
+ Credential rotations
+
+Even if you keep credentials safe, the best practice in the industry is to 
rotate them periodically. This is particularly important in the case of mTLS as 
you will want to introduce new trusted clients or remove old ones. 
Additionally, the security landscape and its standards keep evolving; and find 
that you will have better algorithms and standards today than a few months or 
years ago. To take advantage of improvements and deal with cl

[cassandra-website] branch asf-site updated (2bcdce9 -> 3bee802)

2022-01-31 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cassandra-website.git.


 discard 2bcdce9  generate docs for ea04202b
 add 1286a7d  ninja-fix: update footer to list all the trademarks used
 add 395d33b  January 2022 blog "Tightening Security for Apache Cassandra 
Part: 1"
 add 3bee802  generate docs for 395d33b7

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2bcdce9)
\
 N -- N -- N   refs/heads/asf-site (3bee802)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 content/404.html   |   2 +-
 content/_/_images/blog/emarketer-chart.png | Bin 0 -> 232196 bytes
 .../_images/blog/tighten-security-p1-unsplash.jpg  | Bin 0 -> 199281 bytes
 content/_/apachecon_cfp.html   |   2 +-
 content/_/blog.html|  26 +-
 content/_/blog/Apache-Cassandra-4.0-Overview.html  |   2 +-
 content/_/blog/Apache-Cassandra-4.0-is-Here.html   |   2 +-
 .../Apache-Cassandra-Changelog-1-October-2020.html |   2 +-
 ...Apache-Cassandra-Changelog-10-October-2021.html |   2 +-
 ...Apache-Cassandra-Changelog-11-January-2022.html |   2 +-
 ...Apache-Cassandra-Changelog-2-December-2020.html |   2 +-
 .../Apache-Cassandra-Changelog-3-January-2021.html |   2 +-
 ...Apache-Cassandra-Changelog-4-February-2021.html |   2 +-
 .../Apache-Cassandra-Changelog-5-March-2021.html   |   2 +-
 .../Apache-Cassandra-Changelog-6-April-2021.html   |   2 +-
 .../Apache-Cassandra-Changelog-7-May-2021.html |   2 +-
 .../Apache-Cassandra-Changelog-8-June-2021.html|   2 +-
 .../Apache-Cassandra-Changelog-9-August-2021.html  |   2 +-
 .../_/blog/Apache-Cassandra-Usage-Report-2020.html |   2 +-
 .../blog/Audit-Logging-in-Apache-Cassandra-4.html  |   2 +-
 .../Cassandra-and-Kubernetes-SIG-Update-2.html |   2 +-
 ...andra-and-Kubernetes-SIG-Update-and-Survey.html |   2 +-
 .../Cassandra-on-Kubernetes-A-Beginners-Guide.html |   2 +-
 ...gurable-Storage-Ports-and-Why-We-Need-Them.html |   2 +-
 ...ty-with-5x-Faster-Streaming-in-Cassandra-4.html |   2 +-
 ...ra's-Internals-with-Property-based-Testing.html |   2 +-
 ...-Zero-Copy-Streaming-in-Apache-Cassandra-4.html |   2 +-
 ...and-Verification-Tool-for-Apache-Cassandra.html |   2 +-
 ...che-Cassandras-Front-Door-and-Backpressure.html |   2 +-
 ...n-interview-with-Marcel-Birkner-at-Instana.html |   2 +-
 ...assandra-4-Beta-Battle-Tested-From-Day-One.html |   2 +-
 .../_/blog/Introducing-Transient-Replication.html  |   2 +-
 content/_/blog/Join-Cassandra-GSoC-2021.html   |   2 +-
 .../_/blog/Join-Cassandra-at-ApacheCon-2021.html   |   2 +-
 .../blog/Reaper-Anti-entropy-Repair-Made-Easy.html |   2 +-
 ...ced-for-April-28-Cassandra-4.0-World-Party.html |   2 +-
 ...nced-for-April-28-Cassandra-40-World-Party.html |   2 +-
 content/_/blog/Testing-Apache-Cassandra-4.html |   2 +-
 ...ning-Security-for-Apache-Cassandra-Part-1.html} |  93 +
 content/_/blog/Upgrade-Advisory.html   |   2 +-
 ...sing-Arithmetic-Operators-in-Cassandra-4.0.html |   2 +-
 ...What-the-Future-Holds-for-Apache-Cassandra.html |   2 +-
 content/_/blog/World-Party.html|   2 +-
 content/_/bugs.html|   2 +-
 content/_/case-studies.html|   2 +-
 content/_/case-studies/backblaze.html  |   2 +-
 content/_/cassandra-basics.html|   2 +-
 content/_/community.html   |   2 +-
 content/_/contactus.html   |   2 +-
 content/_/development/ci.html  |   2 +-
 content/_/development/code_style.html  |   2 +-
 content/_/development/dependencies.html|   2 +-
 content/_/development/documentation.html   |   2 +-
 content/_/development/gettingstarted.html  |   2 +-
 content/_/development/how_to_commit.html   |   2 +-
 content/_/development/how_to_review.html   |   2 +-
 content/_/development/ide.html |   2 +-
 content/_/development/index.html   |   2 +-
 content/_/development/patches.html |   2 +-
 content/_/development/release_process.html |   2 +-
 content/_/development/testing.html   

[cassandra-website] 01/01: January 2022 blog "Tightening Security for Apache Cassandra Part: 1"

2022-01-31 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 395d33b7d5b38e06754c71210ec9a6577beac6f4
Author: Diogenese Topper 
AuthorDate: Thu Jan 27 13:50:02 2022 -0800

January 2022 blog "Tightening Security for Apache Cassandra Part: 1"

patch by Maulin Vasavada, Diogenese Topper; reviewed by Eric Ramirez for
CASSANDRA-17317

Add blog post titled "Tightening Security for Apache Cassandra Part: 1"
update blog index
add 2 images for blog
---
 .../modules/ROOT/images/blog/emarketer-chart.png   | Bin 0 -> 232196 bytes
 .../images/blog/tighten-security-p1-unsplash.jpg   | Bin 0 -> 199281 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +++
 ...ening-Security-for-Apache-Cassandra-Part-1.adoc |  45 +
 4 files changed, 69 insertions(+)

diff --git a/site-content/source/modules/ROOT/images/blog/emarketer-chart.png 
b/site-content/source/modules/ROOT/images/blog/emarketer-chart.png
new file mode 100644
index 000..c9d1a60
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/emarketer-chart.png differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/tighten-security-p1-unsplash.jpg 
b/site-content/source/modules/ROOT/images/blog/tighten-security-p1-unsplash.jpg
new file mode 100644
index 000..bb83160
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/tighten-security-p1-unsplash.jpg 
differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 671e40b..a848978 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Tightening Security for Apache Cassandra: Part 1
+[discrete]
+ January 31, 2022
+--
+[openblock,card-content]
+--
+The growth in ecommerce has demanded a greater focus on data security, Maulin 
Vasavada begins a mini-series on how to customize SSL/TLS configurations to 
tighten security in Cassandra 4.0+.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Apache Cassandra Changelog #11
 [discrete]
  January 18, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc
new file mode 100644
index 000..e78ecc5
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc
@@ -0,0 +1,45 @@
+= Tightening Security for Apache Cassandra: Part 1
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: January, 31 2022
+:page-post-author: Maulin Vasavada
+:description: The Apache Cassandra Community
+
+image::blog/tighten-security-p1-unsplash.jpg[secure lock and chain across a 
door]
+
+Image credit: https://unsplash.com/@thommilkovic[Thom Milkovic on Unsplash^]
+
+This series will show you how Apache Cassandra 4.0+ enables users to customize 
SSL/TLS configuration flexibly and enhance the database’s security posture. 
First, we will start with some context before diving into the technical details.
+
+According to eMarketer’s 
https://www.emarketer.com/content/us-ecommerce-forecast-2021[forecast in 
2021^]: “US e-commerce sales are projected to continue to grow by double 
digits, up 17.9% in 2021 to $933.30 billion. E-commerce penetration will 
continue to increase, more than doubling from 2019 to 23.6% in 2025.” While 
eMarketer’s data is only for the US, the global trend is seeing a similar 
upward swing. With this growth in buying online, there is an increased focus on 
security and how t [...]
+
+image::blog/emarketer-chart.png[eMarketer chart]
+[#img-ecommerce]
+The growth in ecommerce also demands software that's both secure and scalable.
+
+=== Adoption of Apache Cassandra & Securing Data
+
+Apache Cassandra is the open source NoSQL database for mission-critical data. 
Its adoption grows day-by-day in the industry, and it’s used by all sizes of 
organizations serving varied technical and business domains, such as IT 
Financial Services, Healthcare, Retail, Government, and Education, to name a 
few. You can find some 
xref:blog/Apache-Cassandra-Usage-Report-2020.adoc[interesting statistics] from 
the 2020 survey about Apache Cassandra’s usage in the industry.
+
+As the web traffic grows for business-to-consumer interactions, service 
providers need to ensure customer data is securely protected and the backing 
softwa

[cassandra-website] branch trunk updated (5e177ff -> 395d33b)

2022-01-31 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


omit 5e177ff  CASSANDRA-17317: January 2022 blog "Tightening Security for 
Apache Cassandra Part: 1"
 new 395d33b  January 2022 blog "Tightening Security for Apache Cassandra 
Part: 1"

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5e177ff)
\
 N -- N -- N   refs/heads/trunk (395d33b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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:

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



[cassandra-website] branch trunk updated: CASSANDRA-17317: January 2022 blog "Tightening Security for Apache Cassandra Part: 1"

2022-01-31 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 5e177ff  CASSANDRA-17317: January 2022 blog "Tightening Security for 
Apache Cassandra Part: 1"
5e177ff is described below

commit 5e177ffe985643c5616e3c6718ee87919174c9f0
Author: Diogenese Topper 
AuthorDate: Thu Jan 27 13:50:02 2022 -0800

CASSANDRA-17317: January 2022 blog "Tightening Security for Apache 
Cassandra Part: 1"

Add blog post titled "Tightening Security for Apache Cassandra Part: 1"
update blog index
add 2 images for blog
---
 .../modules/ROOT/images/blog/emarketer-chart.png   | Bin 0 -> 232196 bytes
 .../images/blog/tighten-security-p1-unsplash.jpg   | Bin 0 -> 199281 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  24 +++
 ...ening-Security-for-Apache-Cassandra-Part-1.adoc |  45 +
 4 files changed, 69 insertions(+)

diff --git a/site-content/source/modules/ROOT/images/blog/emarketer-chart.png 
b/site-content/source/modules/ROOT/images/blog/emarketer-chart.png
new file mode 100644
index 000..c9d1a60
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/emarketer-chart.png differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/tighten-security-p1-unsplash.jpg 
b/site-content/source/modules/ROOT/images/blog/tighten-security-p1-unsplash.jpg
new file mode 100644
index 000..bb83160
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/tighten-security-p1-unsplash.jpg 
differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 671e40b..a848978 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,30 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Tightening Security for Apache Cassandra: Part 1
+[discrete]
+ January 31, 2022
+--
+[openblock,card-content]
+--
+The growth in ecommerce has demanded a greater focus on data security, Maulin 
Vasavada begins a mini-series on how to customize SSL/TLS configurations to 
tighten security in Cassandra 4.0+.
+
+[openblock,card-btn card-btn--blog]
+
+[.btn.btn--alt]
+xref:blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Apache Cassandra Changelog #11
 [discrete]
  January 18, 2022
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc
new file mode 100644
index 000..e78ecc5
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Tightening-Security-for-Apache-Cassandra-Part-1.adoc
@@ -0,0 +1,45 @@
+= Tightening Security for Apache Cassandra: Part 1
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: January, 31 2022
+:page-post-author: Maulin Vasavada
+:description: The Apache Cassandra Community
+
+image::blog/tighten-security-p1-unsplash.jpg[secure lock and chain across a 
door]
+
+Image credit: https://unsplash.com/@thommilkovic[Thom Milkovic on Unsplash^]
+
+This series will show you how Apache Cassandra 4.0+ enables users to customize 
SSL/TLS configuration flexibly and enhance the database’s security posture. 
First, we will start with some context before diving into the technical details.
+
+According to eMarketer’s 
https://www.emarketer.com/content/us-ecommerce-forecast-2021[forecast in 
2021^]: “US e-commerce sales are projected to continue to grow by double 
digits, up 17.9% in 2021 to $933.30 billion. E-commerce penetration will 
continue to increase, more than doubling from 2019 to 23.6% in 2025.” While 
eMarketer’s data is only for the US, the global trend is seeing a similar 
upward swing. With this growth in buying online, there is an increased focus on 
security and how t [...]
+
+image::blog/emarketer-chart.png[eMarketer chart]
+[#img-ecommerce]
+The growth in ecommerce also demands software that's both secure and scalable.
+
+=== Adoption of Apache Cassandra & Securing Data
+
+Apache Cassandra is the open source NoSQL database for mission-critical data. 
Its adoption grows day-by-day in the industry, and it’s used by all sizes of 
organizations serving varied technical and business domains, such as IT 
Financial Services, Healthcare, Retail, Government, and Education, to name a 
few. You can find some 
xref:blog/Apache-Cassandra-Usage-Report-2020.adoc[interesting statistics] from 
the 2020 survey about Apache Cassandra’s usage in the industry.
+
+As the web traffic grows for bu

[cassandra] branch trunk updated: Avoid unecessary array allocations and initializations when performing query checks

2021-12-20 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 11952fa  Avoid unecessary array allocations and initializations when 
performing query checks
11952fa is described below

commit 11952fae774d51d4e268dae506803fef874c8c50
Author: Benjamin Lerer 
AuthorDate: Wed Dec 15 12:41:29 2021 +0100

Avoid unecessary array allocations and initializations when performing 
query checks

patch by Benjamin Lerer; reviewed by Caleb Rackliffe  for CASSANDRA-17209
---
 CHANGES.txt|   1 +
 .../cql3/statements/RequestValidations.java| 265 -
 2 files changed, 210 insertions(+), 56 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 771302e..6208963 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Avoid unecessary array allocations and initializations when performing 
query checks (CASSANDRA-17209)
  * Add guardrail for list operations that require read before write 
(CASSANDRA-17154)
  * Migrate thresholds for number of keyspaces and tables to guardrails 
(CASSANDRA-17195)
  * Remove self-reference in SSTableTidier (CASSANDRA-17205)
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/RequestValidations.java 
b/src/java/org/apache/cassandra/cql3/statements/RequestValidations.java
index f351788..cdaac98 100644
--- a/src/java/org/apache/cassandra/cql3/statements/RequestValidations.java
+++ b/src/java/org/apache/cassandra/cql3/statements/RequestValidations.java
@@ -26,42 +26,136 @@ import java.util.List;
 import org.apache.cassandra.exceptions.InvalidRequestException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
-import static org.apache.commons.lang3.ArrayUtils.EMPTY_OBJECT_ARRAY;
-
 /**
  * Utility methods use to perform request validation.
+ *
+ * This class use overloaded methods to allow to specify different numbers 
of message arguments. While
+ * this introduces some clutter in the API, it avoids array allocation, 
initialization, and garbage collection
+ * overhead that is incurred by varargs calls. 
+ *
+ * Warning about performance
+ *
+ * The goal of this class is to improve readability of code, but in some 
circumstances this may come at a
+ * significant performance cost. Remember that argument values for message 
construction must all be computed eagerly,
+ * and autoboxing may happen as well, even when the check succeeds. If the 
message arguments are expensive to create
+ * you should use the customary form:
+ *  
+ *  if (value < 0.0)
+ *  throw RequestValidations.invalidRequest("negative value: %s", 
toReadableText(value));
+ *  
+ * 
  */
 public final class RequestValidations
 {
 /**
- * Checks that the specified expression is true. If not an 
InvalidRequestException will
+ * Checks that the specified expression is {@code true}. If not an {@code 
InvalidRequestException} will
  * be thrown.
  *
  * @param expression the expression to test
  * @param message the error message
- * @throws InvalidRequestException if the specified expression is 
false.
+ * @throws InvalidRequestException if the specified expression is {@code 
false}.
  */
 public static void checkTrue(boolean expression, String message) throws 
InvalidRequestException
 {
-checkTrue(expression, message, EMPTY_OBJECT_ARRAY);
+if (!expression)
+throw invalidRequest(message);
 }
 
 /**
- * Checks that the specified expression is true. If not an 
InvalidRequestException will
+ * Checks that the specified expression is true. If not an 
{@code InvalidRequestException} will
  * be thrown.
  *
  * @param expression the expression to test
  * @param messageTemplate the template used to build the error message
- * @param messageArgs the message arguments
- * @throws InvalidRequestException if the specified expression is 
false.
+ * @param messageArg the message argument
+ * @throws InvalidRequestException if the specified expression is {@code 
false}.
+ */
+public static void checkTrue(boolean expression,
+ String messageTemplate,
+ Object messageArg) throws 
InvalidRequestException
+{
+if (!expression)
+throw invalidRequest(messageTemplate, messageArg);
+}
+
+/**
+ * Checks that the specified expression is true. If not an 
{@code InvalidRequestException} will
+ * be thrown.
+ *
+ * @param expression the expression to test
+ * @param messageTemplate the template used to build the error message
+ * @param arg1 the first message argument
+ * @param arg2 the second message argument
+ * @throws InvalidRequestException if the specified expression is 

[cassandra] branch trunk updated: Simplify SchemaCQLHelperTest methods

2021-12-15 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 75482d0  Simplify SchemaCQLHelperTest methods
75482d0 is described below

commit 75482d0a8ccd0b0d370aeb7ee60c72cd47a191b0
Author: Kowalczyk 
AuthorDate: Mon Dec 6 22:07:13 2021 +0100

Simplify SchemaCQLHelperTest methods

Patch by Bartlomiej Kowalczyk; reviewed by Ekaterina Dimitrova and
Benjamin Lerer for CASSANDRA-17181
---
 .../org/apache/cassandra/db/SchemaCQLHelper.java   | 50 +++---
 .../org/apache/cassandra/schema/TableMetadata.java | 12 +++---
 .../org/apache/cassandra/cql3/ViewSchemaTest.java  |  3 +-
 .../cql3/validation/entities/TupleTypeTest.java|  1 -
 .../validation/operations/CompactStorageTest.java  | 14 +++---
 .../apache/cassandra/db/SchemaCQLHelperTest.java   |  8 ++--
 .../cassandra/utils/CassandraGenerators.java   |  2 +-
 7 files changed, 35 insertions(+), 55 deletions(-)

diff --git a/src/java/org/apache/cassandra/db/SchemaCQLHelper.java 
b/src/java/org/apache/cassandra/db/SchemaCQLHelper.java
index 5d83a2b..ca9ef25 100644
--- a/src/java/org/apache/cassandra/db/SchemaCQLHelper.java
+++ b/src/java/org/apache/cassandra/db/SchemaCQLHelper.java
@@ -19,6 +19,7 @@
 package org.apache.cassandra.db;
 
 import java.nio.ByteBuffer;
+import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Stream;
@@ -46,34 +47,10 @@ public class SchemaCQLHelper
 // Types come first, as table can't be created without them
 Stream udts = SchemaCQLHelper.getUserTypesAsCQL(metadata, 
types, true);
 
-return Stream.concat(udts,
- reCreateStatements(metadata,
-true,
-true,
-true,
-true));
-}
-
-public static Stream reCreateStatements(TableMetadata metadata,
-boolean 
includeDroppedColumns,
-boolean internals,
-boolean ifNotExists,
-boolean includeIndexes)
-{
-// Record re-create schema statements
-Stream r = Stream.of(metadata)
- .map((tm) -> 
SchemaCQLHelper.getTableMetadataAsCQL(tm,
-   
 includeDroppedColumns,
-   
 internals,
-   
 ifNotExists));
-
-if (includeIndexes)
-{
-// Indexes applied as last, since otherwise they may interfere 
with column drops / re-additions
-r = Stream.concat(r, SchemaCQLHelper.getIndexesAsCQL(metadata, 
ifNotExists));
-}
+Stream tableMatadata = 
Stream.of(SchemaCQLHelper.getTableMetadataAsCQL(metadata));
 
-return r;
+Stream indexes = SchemaCQLHelper.getIndexesAsCQL(metadata, 
true);
+return Stream.of(udts, tableMatadata, 
indexes).flatMap(Function.identity());
 }
 
 /**
@@ -83,20 +60,25 @@ public class SchemaCQLHelper
  * that will not contain everything needed for user types.
  */
 @VisibleForTesting
-public static String getTableMetadataAsCQL(TableMetadata metadata,
-   boolean includeDroppedColumns,
-   boolean internals,
-   boolean ifNotExists)
+public static String getTableMetadataAsCQL(TableMetadata metadata)
 {
 if (metadata.isView())
 {
 KeyspaceMetadata keyspaceMetadata = 
Schema.instance.getKeyspaceMetadata(metadata.keyspace);
 ViewMetadata viewMetadata = 
keyspaceMetadata.views.get(metadata.name).orElse(null);
 assert viewMetadata != null;
-return viewMetadata.toCqlString(internals, ifNotExists);
+/*
+ * first argument(withInternals) indicates to include table 
metadata id and clustering columns order,
+ * second argument(ifNotExists) instructs to include IF NOT EXISTS 
statement within creation statements.
+ */
+return viewMetadata.toCqlString(true, true);
 }
 
-return metadata.toCqlString(includeDroppedColumns, internals, 
ifNotExists);
+/*
+ * With addition to withInternals and ifNotExists arguments, 
includeDroppedColumns will include drop

[cassandra-website] branch trunk updated: CASSANDRA-17157: Added blog post in November 2021 titled "Inside Cassandra: an interview with Marcel Birkner at Instana"

2021-11-17 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 7324a6f  CASSANDRA-17157: Added blog post in November 2021 titled 
"Inside Cassandra: an interview with Marcel Birkner at Instana"
7324a6f is described below

commit 7324a6f2623dd39d140bf9ad6394bb9208cfb1d6
Author: Diogenese Topper 
AuthorDate: Tue Nov 16 16:18:00 2021 -0800

CASSANDRA-17157: Added blog post in November 2021 titled "Inside Cassandra: 
an interview with Marcel Birkner at Instana"

Blog post titled "Inside Cassandra: an interview with Marcel Birkner at 
Instana"

Modified blog index page

Images added for blog
---
 .../inside-Cassandra-Marcel-Birkner/image1.png | Bin 0 -> 226775 bytes
 .../inside-Cassandra-Marcel-Birkner/image2.png | Bin 0 -> 190105 bytes
 .../inside-Cassandra-Marcel-Birkner/image3.png | Bin 0 -> 232206 bytes
 .../inside-Cassandra-Marcel-Birkner/image4.png | Bin 0 -> 106451 bytes
 .../inside-Cassandra-Marcel-Birkner/image5.png | Bin 0 -> 255327 bytes
 site-content/source/modules/ROOT/pages/blog.adoc   |  25 ++
 ...n-interview-with-Marcel-Birkner-at-Instana.adoc |  52 +
 7 files changed, 77 insertions(+)

diff --git 
a/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image1.png
 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image1.png
new file mode 100644
index 000..eda2e6b
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image1.png
 differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image2.png
 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image2.png
new file mode 100644
index 000..3848cb5
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image2.png
 differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image3.png
 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image3.png
new file mode 100644
index 000..a17f6d9
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image3.png
 differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image4.png
 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image4.png
new file mode 100644
index 000..f9dea75
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image4.png
 differ
diff --git 
a/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image5.png
 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image5.png
new file mode 100644
index 000..94238a3
Binary files /dev/null and 
b/site-content/source/modules/ROOT/images/blog/inside-Cassandra-Marcel-Birkner/image5.png
 differ
diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index c41dabc..108fb33 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,31 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Inside Cassandra: an interview with Marcel Birkner at Instana
+[discrete]
+ November 17, 2021
+--
+[openblock,card-content]
+--
+We interview Marcel Birkner, Site Reliability Engineer at Instana, how they 
use Apache Cassandra to store and process the metric data at scale and benefit 
from Cassandra’s fault tolerance, and have learned the importance of 
dog-fooding.
+
+[openblock,card-btn card-btn--blog]
+
+
+[.btn.btn--alt]
+xref:blog/Inside-Cassandra-an-interview-with-Marcel-Birkner-at-Instana.adoc[Read
 More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === What the Future Holds for Apache Cassandra
 [discrete]
  October 26, 2021
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Inside-Cassandra-an-interview-with-Marcel-Birkner-at-Instana.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Inside-Cassandra-an-interview-with-Marcel-Birkner-at-Instana.adoc
new file mode 100644
index 000..f2716dd
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Inside-Cassandra-an-interview-with-Marcel-Birkner-at-Instana.adoc
@@ -0,0 +1,52 @@
+= Inside Cassandra: an interview with Marcel Birkner at Instana
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: November 17, 2021
+:page-post-author: The Apache Cassandra 

[cassandra] branch trunk updated: Add unix time conversion functions

2021-11-09 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 8ddcd43  Add unix time conversion functions
8ddcd43 is described below

commit 8ddcd43b0cfcebfda882a238532d00905fe85eb8
Author: Kanthi Subramanian 
AuthorDate: Sun Oct 17 17:18:58 2021 -0400

Add unix time conversion functions

Patch by Kanthi Subramanian; reviewed by Benjamin Lerer and Brandon
Williams for CASSANDRA-17029
---
 CHANGES.txt|  1 +
 NEWS.txt   |  2 +
 .../apache/cassandra/cql3/functions/TimeFcts.java  | 79 +-
 .../org/apache/cassandra/db/marshal/LongType.java  |  2 +-
 .../cassandra/cql3/functions/TimeFctsTest.java | 39 +++
 .../cql3/validation/entities/TimeuuidTest.java |  2 +-
 6 files changed, 122 insertions(+), 3 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 6ca209e..f436917 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Add unix time conversion functions (CASSANDRA-17029)
  * JVMStabilityInspector.forceHeapSpaceOomMaybe should handle all non-heap 
OOMs rather than only supporting direct only (CASSANDRA-17128)
  * Forbid other Future implementations with checkstyle (CASSANDRA-17055)
  * commit log was switched from non-daemon to daemon threads, which causes the 
JVM to exit in some case as no non-daemon threads are active (CASSANDRA-17085)
diff --git a/NEWS.txt b/NEWS.txt
index d950100..db91c27 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -38,6 +38,8 @@ using the provided 'sstableupgrade' tool.
 
 New features
 
+- New native functions to convert unix time values into C* native types: 
toDate(bigint), toTimestamp(bigint),
+  mintimeuuid(bigint) and maxtimeuuid(bigint)
 - Support for multiple permission in a single GRANT/REVOKE/LIST statement 
has been added. It allows to
   grant/revoke/list multiple permissions using a single statement by 
providing a list of comma-separated
   permissions.
diff --git a/src/java/org/apache/cassandra/cql3/functions/TimeFcts.java 
b/src/java/org/apache/cassandra/cql3/functions/TimeFcts.java
index f029e59..331eaa1 100644
--- a/src/java/org/apache/cassandra/cql3/functions/TimeFcts.java
+++ b/src/java/org/apache/cassandra/cql3/functions/TimeFcts.java
@@ -42,14 +42,18 @@ public abstract class TimeFcts
 now("currentdate", SimpleDateType.instance),
 now("currenttime", TimeType.instance),
 minTimeuuidFct,
+minTimeuuidFct(LongType.instance),
 maxTimeuuidFct,
+maxTimeuuidFct(LongType.instance),
 dateOfFct,
 unixTimestampOfFct,
 toDate(TimeUUIDType.instance),
 toTimestamp(TimeUUIDType.instance),
+toTimestamp(LongType.instance),
 toUnixTimestamp(TimeUUIDType.instance),
 toUnixTimestamp(TimestampType.instance),
 toDate(TimestampType.instance),
+toDate(LongType.instance),
 toUnixTimestamp(SimpleDateType.instance),
 toTimestamp(SimpleDateType.instance));
 }
@@ -64,7 +68,7 @@ public abstract class TimeFcts
 return type.now();
 }
 };
-};
+}
 
 public static final Function minTimeuuidFct = new 
NativeScalarFunction("mintimeuuid", TimeUUIDType.instance, 
TimestampType.instance)
 {
@@ -78,6 +82,21 @@ public abstract class TimeFcts
 }
 };
 
+public static final NativeScalarFunction minTimeuuidFct(final LongType 
type)
+{
+return new NativeScalarFunction("mintimeuuid", TimeUUIDType.instance, 
type)
+{
+public ByteBuffer execute(ProtocolVersion protocolVersion, 
List parameters)
+{
+ByteBuffer bb = parameters.get(0);
+if (bb == null)
+return null;
+
+return 
UUIDGen.toByteBuffer(UUIDGen.minTimeUUID(LongType.instance.toLong(bb)));
+}
+};
+}
+
 public static final Function maxTimeuuidFct = new 
NativeScalarFunction("maxtimeuuid", TimeUUIDType.instance, 
TimestampType.instance)
 {
 public ByteBuffer execute(ProtocolVersion protocolVersion, 
List parameters)
@@ -90,6 +109,21 @@ public abstract class TimeFcts
 }
 };
 
+public static NativeScalarFunction maxTimeuuidFct(final LongType type)
+{
+return new NativeS

[cassandra] branch trunk updated: Allow GRANT/REVOKE multiple permissions in a single statement

2021-10-22 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 1858932  Allow GRANT/REVOKE multiple permissions in a single statement
1858932 is described below

commit 185893256f10c14207bffe49ae733fb1a970aec5
Author: Francisco Guerrero 
AuthorDate: Fri Oct 8 15:05:24 2021 -0700

Allow GRANT/REVOKE multiple permissions in a single statement

patch by Francisco Guerrero; reviewed by Benjamin Lerer and Yifan Cai for 
CASSANDRA-17030

This commit allows GRANT/REVOKE statement to support multiple permissions 
with a single
statement. For example,

```
GRANT MODIFY, SELECT ON KEYSPACE field TO manager;
GRANT ALTER, DROP ON ROLE role1 TO role2;
```
---
 CHANGES.txt|  1 +
 NEWS.txt   |  3 +
 pylib/cqlshlib/cql3handling.py | 12 ++-
 pylib/cqlshlib/test/test_cqlsh_completion.py   | 42 +++---
 src/antlr/Parser.g |  6 +-
 .../apache/cassandra/auth/GrantAndRevokeTest.java  | 20 +
 .../validation/miscellaneous/RoleSyntaxTest.java   | 97 +-
 7 files changed, 109 insertions(+), 72 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 624ae44..0103be2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Allow to GRANT or REVOKE multiple permissions in a single statement 
(CASSANDRA-17030)
  * Allow to grant permission for all tables in a keyspace (CASSANDRA-17027)
  * Log time spent writing keys during compaction (CASSANDRA-17037)
  * Make nodetool compactionstats and sstable_tasks consistent (CASSANDRA-16976)
diff --git a/NEWS.txt b/NEWS.txt
index 162241c..5c48685 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -38,6 +38,9 @@ using the provided 'sstableupgrade' tool.
 
 New features
 
+- Support for multiple permission in a single GRANT/REVOKE/LIST statement 
has been added. It allows to
+  grant/revoke/list multiple permissions using a single statement by 
providing a list of comma-separated
+  permissions.
 - A new ALL TABLES IN KEYSPACE resource has been added. It allows to grant 
permissions for all tables and user types
   in a keyspace while preventing the user to use those permissions on the 
keyspace itself.
 - Added support for type casting in the WHERE clause components and in the 
values of INSERT and UPDATE statements.
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index a99e779..5a9e498 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -1512,7 +1512,7 @@ syntax_rules += r'''
| "EXECUTE"
;
 
- ::= (  "PERMISSION"? )
+ ::= ( [newpermission]= "PERMISSION"? ( "," 
[newpermission]= "PERMISSION"? )* )
| ( "ALL" "PERMISSIONS"? )
;
 
@@ -1547,6 +1547,16 @@ syntax_rules += r'''
 '''
 
 
+@completer_for('permissionExpr', 'newpermission')
+def permission_completer(ctxt, _):
+new_permissions = set([permission.upper() for permission in 
ctxt.get_binding('newpermission')])
+all_permissions = set([permission.arg for permission in 
ctxt.ruleset['permission'].arg])
+suggestions = all_permissions - new_permissions
+if len(suggestions) == 0:
+return [Hint('No more permissions here.')]
+return suggestions
+
+
 @completer_for('username', 'name')
 def username_name_completer(ctxt, cass):
 def maybe_quote(name):
diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py 
b/pylib/cqlshlib/test/test_cqlsh_completion.py
index bc82033..d2cabdb 100644
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@ -834,15 +834,23 @@ class TestCqlshCompletion(CqlshCompletionCase):
 choices=['ALL', 'ALTER', 'AUTHORIZE', 'CREATE', 
'DESCRIBE', 'DROP', 'EXECUTE', 'MODIFY', 'SELECT'],
 other_choices_ok=True)
 self.trycompletions("GRANT MODIFY ",
-choices=['ON', 'PERMISSION'])
+choices=[',', 'ON', 'PERMISSION'])
 self.trycompletions("GRANT MODIFY P",
-immediate='ERMISSION ON ')
-self.trycompletions("GRANT MODIFY PERMISSION O",
+immediate='ERMISSION ')
+self.trycompletions("GRANT MODIFY PERMISSION ",
+choices=[',', 'ON'])
+self.trycompletions("GRANT MODIFY PERMISSION, ",
+choices=['ALTER', 'AUTHORIZE', 'CREATE', 
'DESCRIBE', 'DROP', 'EXECUTE', 'SELECT'])
+self.trycompletions("GRANT MODIFY PERMISS

[cassandra] branch trunk updated: Allow to grant permission for all tables in a keyspace

2021-10-20 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new df6ecaa  Allow to grant permission for all tables in a keyspace
df6ecaa is described below

commit df6ecaae1c3ac3a05c8cd0c6a9c3da58d4e86a98
Author: Benjamin Lerer 
AuthorDate: Fri Oct 8 17:32:15 2021 +0200

Allow to grant permission for all tables in a keyspace

Patch by Benjamin Lerer; Review by Andres de la Peña and Ekaterina 
Dimitrova for CASSANDRA-17027

In some cases it is useful to prevent users to alter or drop a keyspace
while allowing them to create new tables.
This patch add support for a new DataResource below KEYSPACE but above
TABLE. The syntax to grant permission at this level in ALL TABLES IN
KEYSPACE.
---
 CHANGES.txt|   1 +
 NEWS.txt   |   2 +
 pylib/cqlshlib/cql3handling.py |   1 +
 pylib/cqlshlib/test/test_cqlsh_completion.py   |  46 
 src/antlr/Parser.g |   4 +-
 .../cassandra/auth/AuthSchemaChangeListener.java   |   1 +
 .../cassandra/auth/CassandraRoleManager.java   |  33 ++-
 .../org/apache/cassandra/auth/DataResource.java|  42 ++-
 .../cql3/statements/CreateRoleStatement.java   |   1 +
 .../cql3/statements/schema/AlterTypeStatement.java |   2 +-
 .../statements/schema/CreateTableStatement.java|   2 +-
 .../statements/schema/CreateTypeStatement.java |   2 +-
 .../cql3/statements/schema/DropTypeStatement.java  |   2 +-
 .../org/apache/cassandra/service/ClientState.java  |   5 +
 .../apache/cassandra/auth/GrantAndRevokeTest.java  | 302 +
 test/unit/org/apache/cassandra/cql3/CQLTester.java | 151 ++-
 16 files changed, 569 insertions(+), 28 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 21118eb..0bf931d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Allow to grant permission for all tables in a keyspace (CASSANDRA-17027)
  * Log time spent writing keys during compaction (CASSANDRA-17037)
  * Make nodetool compactionstats and sstable_tasks consistent (CASSANDRA-16976)
  * Add metrics and logging around index summary redistribution 
(CASSANDRA-17036)
diff --git a/NEWS.txt b/NEWS.txt
index 0bec628..162241c 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -38,6 +38,8 @@ using the provided 'sstableupgrade' tool.
 
 New features
 
+- A new ALL TABLES IN KEYSPACE resource has been added. It allows to grant 
permissions for all tables and user types
+  in a keyspace while preventing the user to use those permissions on the 
keyspace itself.
 - Added support for type casting in the WHERE clause components and in the 
values of INSERT and UPDATE statements.
 - Warn/abort thresholds added to read queries notifying clients when these 
thresholds trigger (by
   emitting a client warning or aborting the query).  This feature is 
disabled by default, scheduled
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 68484f5..a99e779 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -1524,6 +1524,7 @@ syntax_rules += r'''
 
  ::= ( "ALL" "KEYSPACES" )
  | ( "KEYSPACE"  )
+ | ( "ALL" "TABLES" "IN" "KEYSPACE"  )
  | ( "TABLE"?  )
  ;
 
diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py 
b/pylib/cqlshlib/test/test_cqlsh_completion.py
index c898cbe..bc82033 100644
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@ -826,3 +826,49 @@ class TestCqlshCompletion(CqlshCompletionCase):
 self.trycompletions('ALTER KEYSPACE system_trac', "es WITH replication 
= {'class': '")
 self.trycompletions("ALTER KEYSPACE system_traces WITH replication = 
{'class': '", '',
 choices=['NetworkTopologyStrategy', 
'SimpleStrategy'])
+
+def test_complete_in_grant(self):
+self.trycompletions("GR",
+immediate='ANT ')
+self.trycompletions("GRANT ",
+choices=['ALL', 'ALTER', 'AUTHORIZE', 'CREATE', 
'DESCRIBE', 'DROP', 'EXECUTE', 'MODIFY', 'SELECT'],
+other_choices_ok=True)
+self.trycompletions("GRANT MODIFY ",
+choices=['ON', 'PERMISSION'])
+self.trycompletions("GRANT MODIFY P",
+immediate='ERMISSION ON ')
+self.trycompletions("GRANT MODIFY PERMISSION O",
+immediate='N ')
+self.trycompletions("GRANT MODIFY ON "

[cassandra] branch cassandra-3.11 updated (733c72b -> 6411b44)

2021-10-14 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 733c72b  Merge branch 'cassandra-3.0' into cassandra-3.11
 add 84eb1b8  Log more information when a node runs out of commitlog space
 add 6411b44  Merge branch cassandra-3.0 into cassandra-3.11

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|  1 +
 .../apache/cassandra/db/commitlog/CommitLog.java   | 29 --
 2 files changed, 28 insertions(+), 2 deletions(-)

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



[cassandra] branch cassandra-3.0 updated (efc27d6 -> 84eb1b8)

2021-10-14 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from efc27d6  Save CircleCI resources with optional test jobs
 add 84eb1b8  Log more information when a node runs out of commitlog space

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|  1 +
 .../apache/cassandra/db/commitlog/CommitLog.java   | 30 --
 2 files changed, 29 insertions(+), 2 deletions(-)

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



[cassandra] branch cassandra-4.0 updated (2da2747 -> be1684b)

2021-10-14 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 2da2747  Merge branch 'cassandra-3.11' into cassandra-4.0
 add 84eb1b8  Log more information when a node runs out of commitlog space
 add 6411b44  Merge branch cassandra-3.0 into cassandra-3.11
 add be1684b  Merge branch cassandra-3.11 into cassandra-4.0

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|  1 +
 .../apache/cassandra/db/commitlog/CommitLog.java   | 29 --
 2 files changed, 28 insertions(+), 2 deletions(-)

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



[cassandra] 01/01: Merge branch cassandra-4.0 into trunk

2021-10-14 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit ebce74ee2d186359bbd83c33b96f5b6c3ae1f856
Merge: d389620 be1684b
Author: Benjamin Lerer 
AuthorDate: Thu Oct 14 15:29:37 2021 +0200

Merge branch cassandra-4.0 into trunk

 CHANGES.txt|  1 +
 .../apache/cassandra/db/commitlog/CommitLog.java   | 31 --
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLog.java
index 5f386d1,d18f19b..a4be769
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
@@@ -17,11 -17,9 +17,12 @@@
   */
  package org.apache.cassandra.db.commitlog;
  
 -import java.io.*;
 +
 +import java.io.IOException;
  import java.nio.ByteBuffer;
++import java.nio.file.FileStore;
  import java.util.*;
 +import java.util.function.BiPredicate;
  import java.util.function.Function;
  import java.util.zip.CRC32;
  
@@@ -41,6 -38,6 +42,7 @@@ import org.apache.cassandra.io.util.Buf
  import org.apache.cassandra.io.util.DataOutputBuffer;
  import org.apache.cassandra.io.util.DataOutputBufferFixed;
  import org.apache.cassandra.io.util.FileUtils;
++import org.apache.cassandra.io.util.PathUtils;
  import org.apache.cassandra.metrics.CommitLogMetrics;
  import org.apache.cassandra.net.MessagingService;
  import org.apache.cassandra.schema.CompressionParams;
@@@ -492,6 -488,11 +494,11 @@@ public class CommitLog implements Commi
  return start().recoverSegmentsOnDisk();
  }
  
+ public static long freeDiskSpace()
+ {
 -return FileUtils.getFreeSpace(new 
File(DatabaseDescriptor.getCommitLogLocation()));
++return PathUtils.tryGetSpace(new 
File(DatabaseDescriptor.getCommitLogLocation()).toPath(), 
FileStore::getTotalSpace);
+ }
+ 
  @VisibleForTesting
  public static boolean handleCommitError(String message, Throwable t)
  {

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



[cassandra] branch trunk updated (d389620 -> ebce74e)

2021-10-14 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from d389620  Log time spent writing keys during compaction
 add 84eb1b8  Log more information when a node runs out of commitlog space
 add 6411b44  Merge branch cassandra-3.0 into cassandra-3.11
 add be1684b  Merge branch cassandra-3.11 into cassandra-4.0
 new ebce74e  Merge branch cassandra-4.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 +
 .../apache/cassandra/db/commitlog/CommitLog.java   | 31 --
 2 files changed, 30 insertions(+), 2 deletions(-)

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



[cassandra-website] branch trunk updated: Added blog post and card to blog index

2021-10-06 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new b7b6e8b  Added blog post and card to blog index
b7b6e8b is described below

commit b7b6e8bd1a8e81a4ea7741124e8938059dabac40
Author: Diogenese Topper 
AuthorDate: Thu Sep 30 15:49:03 2021 -0700

Added blog post and card to blog index

- Blog post is titled "Apache Cassandra Changelog #10"
- Modified blog index page for added blog
---
 site-content/source/modules/ROOT/pages/blog.adoc   | 25 ++
 ...Apache-Cassandra-Changelog-10-October-2021.adoc | 93 ++
 2 files changed, 118 insertions(+)

diff --git a/site-content/source/modules/ROOT/pages/blog.adoc 
b/site-content/source/modules/ROOT/pages/blog.adoc
index 268f404..e73eb44 100644
--- a/site-content/source/modules/ROOT/pages/blog.adoc
+++ b/site-content/source/modules/ROOT/pages/blog.adoc
@@ -14,6 +14,31 @@ NOTES FOR CONTENT CREATORS
 [openblock,card-header]
 --
 [discrete]
+=== Apache Cassandra Changelog #10
+[discrete]
+ October 5, 2021
+--
+[openblock,card-content]
+--
+Apache Cassandra 4.0.1 is released, and Aleksei Zotov becomes a committer. 
Discussions are underway for some key, new feature proposals, including support 
for general-purpose transactions and Storage Attached Index (SAI). CEP-11, the 
pluggable memtable implementations proposal, has been approved, as has CEP-13 
for a denylisting partitions feature.l-making.
+
+[openblock,card-btn card-btn--blog]
+
+
+[.btn.btn--alt]
+xref:blog/Apache-Cassandra-Changelog-10-October-2021.adoc[Read More]
+
+
+--
+
+//end card
+
+//start card
+[openblock,card shadow relative test]
+
+[openblock,card-header]
+--
+[discrete]
 === Join Cassandra at Apachecon 2021
 [discrete]
  August 27, 2021
diff --git 
a/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-10-October-2021.adoc
 
b/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-10-October-2021.adoc
new file mode 100644
index 000..f8f9c81
--- /dev/null
+++ 
b/site-content/source/modules/ROOT/pages/blog/Apache-Cassandra-Changelog-10-October-2021.adoc
@@ -0,0 +1,93 @@
+= Apache Cassandra Changelog #10
+:page-layout: single-post
+:page-role: blog-post
+:page-post-date: October 5, 2021
+:page-post-author: The Apache Cassandra Community
+:description: The Apache Cassandra Community
+:keywords: 
+
+image::blog/changelog_header.jpg[Apache Cassandra Changelog]
+Our monthly roundup of key activities and knowledge to keep the community 
informed.
+
+== Release Notes
+=== Released
+
+The latest release of Apache Cassandra is 
https://www.apache.org/dyn/closer.lua/cassandra/4.0.1[4.0.1,window=_blank] 
(https://archive.apache.org/dist/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz.asc[pgp,window=_blank],
 
https://archive.apache.org/dist/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz.sha256[sha256,window=_blank],
 and 
https://archive.apache.org/dist/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz.sha512[sha512).
 This is a rapid release to fix a https://issues.apache [...]
+
+Note: As the docs are not yet updated, the bintray location for Debian users 
is replaced with the https://apache.jfrog.io/artifactory/cassandra/[ASF's JFrog 
Artifactory location,window=_blank].
+
+See the https://cassandra.apache.org/download/[download section] for the 
latest stable and older supported versions of source and binary distributions.
+
+To stay up-to-date, we recommend joining the Cassandra 
xref:community.adoc#join-the-conversation[mailing list].
+
+== Community Notes
+
+_Updates on Cassandra Enhancement Proposals (CEPs), how to contribute, and 
other community activities._
+
+_Are you new to the project? We have established a 
https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=484.[New 
Release tracking Kanboard,window=_blank] and a 
"https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=484=2162=2160[Starter
 Tickets,window=_blank]" quick label that corresponds to our Low Hanging Fruit 
status. Any of these tickets should be of appropriate complexity for someone 
new to the project to tackle._
+
+Read PMC member Josh McKenzie’s 
https://lists.apache.org/list.html?d...@cassandra.apache.org:2021-9[bi-weekly 
update,window=_blank] for ongoing discussions and the latest on ticket progress.
+
+=== Added
+
+The Project Management Committee (PMC) is pleased to announce that *Aleksei 
Zotov* has been invited to 
https://lists.apache.org/thread.html/r6ff82e48720931055f5eb0bc494434f5be7959ef78345a642a980419%40%3Cdev.cassandra.apache.org%3E[become
 a committer,window=_blank], and he has accepted! Thank you for all your 
contributions over the years, Aleksei, and congratulations!  
+
+=== Discussed
+
+After the release of Apache Cassandra 4.0, w

[cassandra] 01/01: Merge branch cassandra-4.0 into trunk

2021-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 41c1eeb4f52316e8ee825c736eb372c3c13952d7
Merge: 5ee1ba2 984f763
Author: Benjamin Lerer 
AuthorDate: Tue Sep 28 16:59:10 2021 +0200

Merge branch cassandra-4.0 into trunk

 CHANGES.txt|   1 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  37 +++-
 .../test/SinglePartitionReadCommandTest.java   |  74 +++
 .../miscellaneous/SSTablesIteratedTest.java| 227 ++---
 4 files changed, 304 insertions(+), 35 deletions(-)


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



[cassandra] branch trunk updated (5ee1ba2 -> 41c1eeb)

2021-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from 5ee1ba2  Merge branch 'cassandra-4.0' into trunk
 add 9f49284  Avoid useless SSTable reads during single partition queries
 add 4d64ff7  Merge branch cassandra-3.0 into cassandra-3.11
 add 984f763  Merge branch cassandra-3.11 into cassandra-4.0
 new 41c1eeb  Merge branch cassandra-4.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 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  37 +++-
 .../test/SinglePartitionReadCommandTest.java   |  74 +++
 .../miscellaneous/SSTablesIteratedTest.java| 227 ++---
 4 files changed, 304 insertions(+), 35 deletions(-)

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



[cassandra] branch cassandra-3.11 updated (02840c9 -> 4d64ff7)

2021-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 02840c9  Don't validate index keys
 add 9f49284  Avoid useless SSTable reads during single partition queries
 add 4d64ff7  Merge branch cassandra-3.0 into cassandra-3.11

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|   1 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  18 +-
 .../test/SinglePartitionReadCommandTest.java   |  74 +++
 .../miscellaneous/SSTablesIteratedTest.java| 227 ++---
 4 files changed, 286 insertions(+), 34 deletions(-)

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



[cassandra] branch cassandra-4.0 updated (5f97977 -> 984f763)

2021-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 5f97977  Ensure the cqlsh shell script does not behave unexpectedly on 
Python 3.10+ patch by Bowen Song; revieewed by Ekaterina Dimitrova, Brandon 
Williams for CASSANDRA-16987
 add 9f49284  Avoid useless SSTable reads during single partition queries
 add 4d64ff7  Merge branch cassandra-3.0 into cassandra-3.11
 add 984f763  Merge branch cassandra-3.11 into cassandra-4.0

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|   1 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  37 +++-
 .../test/SinglePartitionReadCommandTest.java   |  74 +++
 .../miscellaneous/SSTablesIteratedTest.java| 227 ++---
 4 files changed, 304 insertions(+), 35 deletions(-)

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



[cassandra] branch cassandra-3.0 updated (bd406c7 -> 9f49284)

2021-09-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from bd406c7  Ignore LongSharedExecutorPoolTest until SEPThreadpool is 
re-evaluated
 add 9f49284  Avoid useless SSTable reads during single partition queries

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|   1 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  18 +-
 .../test/SinglePartitionReadCommandTest.java   |  75 +++
 .../miscellaneous/SSTablesIteratedTest.java| 231 ++---
 4 files changed, 291 insertions(+), 34 deletions(-)

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



[cassandra] branch trunk updated: Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation allows it

2021-09-17 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new f7c71f6  Allow DELETE and TRUNCATE to work on Virtual Tables if the 
implementation allows it
f7c71f6 is described below

commit f7c71f65c000c2c3ef7df1b034b8fdd822a396d8
Author: Aleksei Zotov 
AuthorDate: Fri Jul 23 21:45:12 2021 +0400

Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
allows it

patch by Aleksei Zoto; reviewed by Benjamin Lerer and Chris Lohfink for
CASSANDRA-16806
---
 CHANGES.txt|   3 +-
 doc/source/new/virtualtables.rst   |  22 +-
 .../cassandra/cql3/statements/DeleteStatement.java |   4 +-
 .../cql3/statements/ModificationStatement.java |   1 +
 .../cql3/statements/TruncateStatement.java |  31 +-
 .../db/virtual/AbstractMutableVirtualTable.java| 398 ++
 .../cassandra/db/virtual/AbstractVirtualTable.java |   8 +-
 .../apache/cassandra/db/virtual/VirtualTable.java  |   7 +-
 .../cql3/validation/entities/VirtualTableTest.java | 815 ++---
 9 files changed, 1174 insertions(+), 115 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 6b95485..3fb4df5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Allow DELETE and TRUNCATE to work on Virtual Tables if the implementation 
allows it (CASSANDRA-16806)
  * Include SASI components to snapshots (CASSANDRA-15134)
  * Fix missed wait latencies in the output of `nodetool tpstats -F` 
(CASSANDRA-16938)
  * Reduce native transport max frame size to 16MB (CASSANDRA-16886)
@@ -38,7 +39,7 @@ Merged from 3.0:
 
 4.0.1
  * Tolerate missing DNS entry when completing a host replacement 
(CASSANDRA-16873)
- * Harden PrunableArrayQueue against Pruner implementations that might throw 
exceptions (CASSANDRA-16866) 
+ * Harden PrunableArrayQueue against Pruner implementations that might throw 
exceptions (CASSANDRA-16866)
  * Move RepairedDataInfo to the execution controller rather than the 
ReadCommand to avoid unintended sharing (CASSANDRA-16721)
  * Bump zstd-jni version to 1.5.0-4 (CASSANDRA-16884)
  * Remove assumption that all urgent messages are small (CASSANDRA-16877)
diff --git a/doc/source/new/virtualtables.rst b/doc/source/new/virtualtables.rst
index 1c8766c..0cb988f 100644
--- a/doc/source/new/virtualtables.rst
+++ b/doc/source/new/virtualtables.rst
@@ -38,15 +38,15 @@ How  are Virtual Tables different from regular tables?
 
 Virtual tables and virtual keyspaces are quite different from regular tables 
and keyspaces respectively such as:
 
-- Virtual tables are read-only, but it is likely to change
+- Virtual tables support modifications only if the underlaying implementation 
allows it
 - Virtual tables are not replicated
 - Virtual tables are local only and non distributed
 - Virtual tables have no associated SSTables
 - Consistency level of the queries sent virtual tables are ignored
-- Virtual tables are managed by Cassandra and a user cannot run  DDL to create 
new virtual tables or DML to modify existing virtual   tables
+- Virtual tables are managed by Cassandra and a user cannot run DDL to create 
new virtual tables to modify existing virtual tables
 - Virtual tables are created in special keyspaces and not just any keyspace
-- All existing virtual tables use ``LocalPartitioner``. Since a virtual table 
is not replicated the partitioner sorts in order of partition   keys 
instead of by their hash.
-- Making advanced queries with ``ALLOW FILTERING`` and aggregation functions 
may be used with virtual tables even though in normal  tables we   don't 
recommend it
+- All existing virtual tables use ``LocalPartitioner``. Since a virtual table 
is not replicated the partitioner sorts in order of partition keys instead of 
by their hash.
+- Making advanced queries with ``ALLOW FILTERING`` and aggregation functions 
may be used with virtual tables even though in normal tables we don't recommend 
it
 
 Virtual Keyspaces
 ^
@@ -66,21 +66,21 @@ Virtual Table Limitations
 
 Virtual tables and virtual keyspaces have some limitations initially though 
some of these could change such as:
 
-- Cannot alter or drop virtual keyspaces or tables
-- Cannot truncate virtual tables
 - Expiring columns are not supported by virtual tables
+- Custom timestamps are not supported by virtual tables
 - Conditional updates are not supported by virtual tables
-- Cannot create tables in virtual keyspaces
-- Cannot perform any operations against virtual keyspace
 - Secondary indexes are not supported on virtual tables
-- Cannot create functions in virtual keyspaces
-- Cannot create types in virtual keyspaces
 - Materialized views are not supported on virtual tables
-- Virtual tables don't support ``DELETE`` statements
+- Virtual tables support

[cassandra] branch trunk updated: Add support for filtering using IN restrictions

2021-09-08 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new dcee430  Add support for filtering using IN restrictions
dcee430 is described below

commit dcee430e57f3fd37e4bc6652ad7180361e31444e
Author: nvharikrishna 
AuthorDate: Wed Aug 18 15:06:03 2021 +0200

Add support for filtering using IN restrictions

patch by Venkata Harikrishna Nukala; reviewed by Andrés de la Peña and
Benjamin Lerer for CASSANDRA-14344
---
 CHANGES.txt|   1 +
 src/java/org/apache/cassandra/cql3/Operator.java   |   5 +-
 .../cassandra/cql3/SingleColumnRelation.java   |  10 --
 .../cql3/restrictions/MultiColumnRestriction.java  |  19 ++-
 .../cql3/restrictions/SingleColumnRestriction.java |   7 +-
 .../cql3/restrictions/StatementRestrictions.java   |   3 -
 .../org/apache/cassandra/db/filter/RowFilter.java  |   6 +-
 .../cassandra/index/sasi/conf/ColumnIndex.java |   2 +-
 .../cassandra/index/sasi/plan/Expression.java  |   5 +-
 .../cassandra/serializers/ListSerializer.java  |  37 ++
 .../validation/operations/CompactStorageTest.java  |  26 ++--
 .../operations/SelectMultiColumnRelationTest.java  |  42 ++
 .../operations/SelectSingleColumnRelationTest.java | 146 -
 .../cql3/validation/operations/SelectTest.java |  64 ++---
 .../apache/cassandra/index/sasi/SASICQLTest.java   |  16 +++
 15 files changed, 334 insertions(+), 55 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index c3000d4..5d4c20f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Add support for filtering using IN restrictions (CASSANDRA-14344)
  * Provide a nodetool command to invalidate auth caches (CASSANDRA-16404)
  * Catch read repair timeout exceptions and add metric (CASSANDRA-16880)
  * Exclude Jackson 1.x transitive dependency of hadoop* provided dependencies 
(CASSANDRA-16854)
diff --git a/src/java/org/apache/cassandra/cql3/Operator.java 
b/src/java/org/apache/cassandra/cql3/Operator.java
index 1acedee..992056c 100644
--- a/src/java/org/apache/cassandra/cql3/Operator.java
+++ b/src/java/org/apache/cassandra/cql3/Operator.java
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.cassandra.db.marshal.*;
+import org.apache.cassandra.serializers.ListSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public enum Operator
@@ -110,8 +111,8 @@ public enum Operator
 
 public boolean isSatisfiedBy(AbstractType type, ByteBuffer 
leftOperand, ByteBuffer rightOperand)
 {
-List inValues = ListType.getInstance(type, 
false).getSerializer().deserialize(rightOperand);
-return 
inValues.contains(type.getSerializer().deserialize(leftOperand));
+ListSerializer serializer = ListType.getInstance(type, 
false).getSerializer();
+return serializer.anyMatch(rightOperand, r -> 
type.compareForCQL(leftOperand, r) == 0);
 }
 },
 CONTAINS(5)
diff --git a/src/java/org/apache/cassandra/cql3/SingleColumnRelation.java 
b/src/java/org/apache/cassandra/cql3/SingleColumnRelation.java
index 9ff3f07..cf1cb69 100644
--- a/src/java/org/apache/cassandra/cql3/SingleColumnRelation.java
+++ b/src/java/org/apache/cassandra/cql3/SingleColumnRelation.java
@@ -274,16 +274,6 @@ public final class SingleColumnRelation extends Relation
 {
 ColumnSpecification receiver = columnDef;
 
-if (isIN())
-{
-// We only allow IN on the row key and the clustering key so far, 
never on non-PK columns, and this even if
-// there's an index
-// Note: for backward compatibility reason, we conside a IN of 1 
value the same as a EQ, so we let that
-// slide.
-checkFalse(!columnDef.isPrimaryKeyColumn() && 
!canHaveOnlyOneValue(),
-   "IN predicates on non-primary-key columns (%s) is not 
yet supported", columnDef.name);
-}
-
 checkFalse(isContainsKey() && !(receiver.type instanceof MapType), 
"Cannot use CONTAINS KEY on non-map column %s", receiver.name);
 checkFalse(isContains() && !(receiver.type.isCollection()), "Cannot 
use CONTAINS on non-collection column %s", receiver.name);
 
diff --git 
a/src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java 
b/src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java
index 4c6ce2f..acbb48e 100644
--- 
a/src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java
+++ 
b/src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java
@@ -21,6 +21,8 @@ import java.nio.ByteBuffer;
 import java.util.*;
 
 import org.apache.cassandra.schema.ColumnMetadata;
+import

[cassandra] branch trunk updated: Open java driver connections in CQLTester in a lazy way

2021-09-07 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new 138569b  Open java driver connections in CQLTester in a lazy way
138569b is described below

commit 138569b079b3d17b1020a24463adabecd903b79f
Author: Benjamin Lerer 
AuthorDate: Mon Sep 6 13:36:14 2021 +0200

Open java driver connections in CQLTester in a lazy way

patch by Benjamin Lerer; reviewed by Andrés de la Peña for CASSANDRA-16918
---
 .../apache/cassandra/transport/DriverBurnTest.java |   2 +-
 test/unit/org/apache/cassandra/cql3/CQLTester.java | 122 +++--
 .../cassandra/cql3/PreparedStatementsTest.java |  10 +-
 .../metrics/ClientRequestSizeMetricsTest.java  |   4 +-
 .../transport/ClientNotificiationsTest.java|   3 +-
 .../transport/ClientResourceLimitsTest.java|   5 +-
 .../cassandra/transport/RateLimitingTest.java  |   5 +-
 7 files changed, 80 insertions(+), 71 deletions(-)

diff --git a/test/burn/org/apache/cassandra/transport/DriverBurnTest.java 
b/test/burn/org/apache/cassandra/transport/DriverBurnTest.java
index 37ebec1..8aaf87e 100644
--- a/test/burn/org/apache/cassandra/transport/DriverBurnTest.java
+++ b/test/burn/org/apache/cassandra/transport/DriverBurnTest.java
@@ -62,7 +62,7 @@ public class DriverBurnTest extends CQLTester
 }
 };
 
-requireNetwork((builder) -> 
builder.withPipelineConfigurator(configurator));
+requireNetwork(builder -> 
builder.withPipelineConfigurator(configurator), builder -> {});
 }
 
 @Test
diff --git a/test/unit/org/apache/cassandra/cql3/CQLTester.java 
b/test/unit/org/apache/cassandra/cql3/CQLTester.java
index f3c279c..56be6f6 100644
--- a/test/unit/org/apache/cassandra/cql3/CQLTester.java
+++ b/test/unit/org/apache/cassandra/cql3/CQLTester.java
@@ -125,7 +125,9 @@ public abstract class CQLTester
 protected static final InetAddress nativeAddr;
 protected static final Set remoteAddrs = new 
HashSet<>();
 private static final Map clusters = new 
HashMap<>();
-protected static final Map sessions = new 
HashMap<>();
+private static final Map sessions = new 
HashMap<>();
+
+private static Consumer clusterBuilderConfigurator;
 
 public static final List PROTOCOL_VERSIONS = new 
ArrayList<>(ProtocolVersion.SUPPORTED.size());
 
@@ -411,26 +413,27 @@ public abstract class CQLTester
 return allArgs;
 }
 
-protected static void requireNetworkWithoutDriver()
-{
-startServices();
-startServer(server -> {});
-}
-
-// lazy initialization for all tests that require Java Driver
+/**
+ *  Initialize Native Transport for test that need it.
+ */
 protected static void requireNetwork() throws ConfigurationException
 {
-requireNetwork(server -> {});
+requireNetwork(server -> {}, cluster -> {});
 }
 
-// lazy initialization for all tests that require Java Driver
-protected static void requireNetwork(Consumer decorator) 
throws ConfigurationException
+/**
+ *  Initialize Native Transport for the tests that need it.
+ */
+protected static void requireNetwork(Consumer 
serverConfigurator,
+ Consumer 
clusterConfigurator) throws ConfigurationException
 {
 if (server != null)
 return;
 
+clusterBuilderConfigurator = clusterConfigurator;
+
 startServices();
-initializeNetwork(decorator, null);
+startServer(serverConfigurator);
 }
 
 private static void startServices()
@@ -443,10 +446,11 @@ public abstract class CQLTester
 
 protected static void reinitializeNetwork()
 {
-reinitializeNetwork(null);
+reinitializeNetwork(server -> {}, cluster -> {});
 }
 
-protected static void reinitializeNetwork(Consumer 
clusterConfigurator)
+protected static void reinitializeNetwork(Consumer 
serverConfigurator,
+  Consumer 
clusterConfigurator)
 {
 if (server != null && server.isRunning())
 {
@@ -462,54 +466,49 @@ public abstract class CQLTester
 clusters.clear();
 sessions.clear();
 
-initializeNetwork(server -> {}, clusterConfigurator);
+clusterBuilderConfigurator = clusterConfigurator;
+
+startServer(serverConfigurator);
 }
 
-private static void initializeNetwork(Consumer decorator, 
Consumer clusterConfigurator)
+private static void startServer(Consumer decorator)
 {
-startServer(decorator);
-
-for (ProtocolVersion version : PROTOCOL_VERSIONS)
-{
-if (clusters.containsKey(version))
-continue;
+Server.Builder serverBuil

[cassandra] branch trunk updated (a569803 -> 057f8e5)

2021-08-31 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from a569803  Merge branch 'cassandra-4.0' into trunk
 add af17f13  Fix clustering order logic in CREATE MATERIALIZED VIEW
 new 057f8e5  Merge branch cassandra-4.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 +
 .../statements/schema/CreateViewStatement.java |  19 +--
 src/java/org/apache/cassandra/db/Columns.java  |   1 -
 .../org/apache/cassandra/cql3/ViewSchemaTest.java  | 134 +
 .../cql3/statements/DescribeStatementTest.java |  45 ++-
 5 files changed, 190 insertions(+), 10 deletions(-)

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



[cassandra] 01/01: Merge branch cassandra-4.0 into trunk

2021-08-31 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 057f8e5007d5c00d13e8af500b04b93b1eb7f855
Merge: a569803 af17f13
Author: Benjamin Lerer 
AuthorDate: Tue Aug 31 16:59:06 2021 +0200

Merge branch cassandra-4.0 into trunk

 CHANGES.txt|   1 +
 .../statements/schema/CreateViewStatement.java |  19 +--
 src/java/org/apache/cassandra/db/Columns.java  |   1 -
 .../org/apache/cassandra/cql3/ViewSchemaTest.java  | 134 +
 .../cql3/statements/DescribeStatementTest.java |  45 ++-
 5 files changed, 190 insertions(+), 10 deletions(-)

diff --cc CHANGES.txt
index 7b792e4,aef6fe1..17a5c99
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,27 -1,10 +1,28 @@@
 -4.0.2
 - * Fix clustering order logic in CREATE MATERIALIZED VIEW (CASSANDRA-16898)
 -
 -4.0.1
 +4.1
   * Exclude Jackson 1.x transitive dependency of hadoop* provided dependencies 
(CASSANDRA-16854)
 + * Add client warnings and abort to tombstone and coordinator reads which go 
past a low/high watermark (CASSANDRA-16850)
 + * Add TTL support to nodetool snapshots (CASSANDRA-16789)
 + * Allow CommitLogSegmentReader to optionally skip sync marker CRC checks 
(CASSANDRA-16842)
 + * allow blocking IPs from updating metrics about traffic (CASSANDRA-16859)
 + * Request-Based Native Transport Rate-Limiting (CASSANDRA-16663)
 + * Implement nodetool getauditlog command (CASSANDRA-16725)
 + * Clean up repair code (CASSANDRA-13720)
 + * Background schedule to clean up orphaned hints files (CASSANDRA-16815)
 + * Modify SecondaryIndexManager#indexPartition() to retrieve only columns for 
which indexes are actually being built (CASSANDRA-16776)
 + * Batch the token metadata update to improve the speed (CASSANDRA-15291)
 + * Reduce the log level on "expected" repair exceptions (CASSANDRA-16775)
 + * Make JMXTimer expose attributes using consistent time unit 
(CASSANDRA-16760)
 + * Remove check on gossip status from DynamicEndpointSnitch::updateScores 
(CASSANDRA-11671)
 + * Fix AbstractReadQuery::toCQLString not returning valid CQL 
(CASSANDRA-16510)
 + * Log when compacting many tombstones (CASSANDRA-16780)
 + * Display bytes per level in tablestats for LCS tables (CASSANDRA-16799)
 + * Add isolated flush timer to CommitLogMetrics and ensure writes correspond 
to single WaitingOnCommit data points (CASSANDRA-16701)
 + * Add a system property to set hostId if not yet initialized 
(CASSANDRA-14582)
 + * GossiperTest.testHasVersion3Nodes didn't take into account trunk version 
changes, fixed to rely on latest version (CASSANDRA-16651)
 +Merged from 4.0:
++ * Fix clustering order logic in CREATE MATERIALIZED VIEW (CASSANDRA-16898)
   * Tolerate missing DNS entry when completing a host replacement 
(CASSANDRA-16873)
 - * Harden PrunableArrayQueue against Pruner implementations that might throw 
exceptions (CASSANDRA-16866)
 + * Harden PrunableArrayQueue against Pruner implementations that might throw 
exceptions (CASSANDRA-16866) 
   * Move RepairedDataInfo to the execution controller rather than the 
ReadCommand to avoid unintended sharing (CASSANDRA-16721)
   * Bump zstd-jni version to 1.5.0-4 (CASSANDRA-16884)
   * Remove assumption that all urgent messages are small (CASSANDRA-16877)

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



[cassandra] branch cassandra-4.0 updated (78c6279 -> af17f13)

2021-08-31 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 78c6279  Replace spinAsserts code with Awaitility code
 add af17f13  Fix clustering order logic in CREATE MATERIALIZED VIEW

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt|   3 +
 .../statements/schema/CreateViewStatement.java |  19 +--
 src/java/org/apache/cassandra/db/Columns.java  |   1 -
 .../org/apache/cassandra/cql3/ViewSchemaTest.java  | 134 +
 .../cql3/statements/DescribeStatementTest.java |  45 ++-
 5 files changed, 192 insertions(+), 10 deletions(-)

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



[cassandra] branch cassandra-4.0 updated (cb19b39 -> 433274b)

2021-08-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from cb19b39  Merge branch 'cassandra-3.11' into cassandra-4.0
 add 632790f  Remove possible infinite loop in NIODataInputStreamTest
 add 6eb02a2  Merge branch cassandra-3.0 into cassandra-3.11
 add 433274b  Merge branch cassandra-3.11 into cassandra-4.0

No new revisions were added by this update.

Summary of changes:
 test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[cassandra] branch trunk updated (fd3eb4f -> 304deea)

2021-08-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from fd3eb4f  Clean up repair code patch by Simon Zhou; reviewed by 
Ekaterina Dimitrova and Andrés de la Peña for CASSANDRA-13720
 add 632790f  Remove possible infinite loop in NIODataInputStreamTest
 add 6eb02a2  Merge branch cassandra-3.0 into cassandra-3.11
 add 433274b  Merge branch cassandra-3.11 into cassandra-4.0
 new 304deea  Merge branch cassandra-4.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:
 test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[cassandra] 01/01: Merge branch cassandra-4.0 into trunk

2021-08-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit 304deead2c4a6aa4576783120d12858459d69098
Merge: fd3eb4f 433274b
Author: Benjamin Lerer 
AuthorDate: Wed Aug 18 16:09:44 2021 +0200

Merge branch cassandra-4.0 into trunk

 test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[cassandra] branch cassandra-3.0 updated (0770666 -> 632790f)

2021-08-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 0770666  Build tests in CircleCI build job
 add 632790f  Remove possible infinite loop in NIODataInputStreamTest

No new revisions were added by this update.

Summary of changes:
 test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[cassandra] branch cassandra-3.11 updated (e581a85 -> 6eb02a2)

2021-08-18 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from e581a85  Fixup scrub output when no data post-scrub and clear up old 
use of row, which really means partition patch by Ekaterina Dimitrova; reviewed 
by Brandon Williams for CASSANDRA-16835
 add 632790f  Remove possible infinite loop in NIODataInputStreamTest
 add 6eb02a2  Merge branch cassandra-3.0 into cassandra-3.11

No new revisions were added by this update.

Summary of changes:
 test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



[cassandra] branch cassandra-3.11 updated (01add65 -> a88f4b3)

2021-07-30 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 01add65  Merge branch 'cassandra-3.0' into cassandra-3.11
 add e399dea  Handle properly UnsatisfiedLinkError in 
NativeLibrary#getProcessID()
 add a88f4b3  Merge branch cassandra-3.0 into cassandra-3.11

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/utils/NativeLibrary.java | 4 
 2 files changed, 5 insertions(+)

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



[cassandra] branch cassandra-3.0 updated (69b653a -> e399dea)

2021-07-30 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 69b653a  Remove mutation data from error log message
 add e399dea  Handle properly UnsatisfiedLinkError in 
NativeLibrary#getProcessID()

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/utils/NativeLibrary.java | 4 
 2 files changed, 5 insertions(+)

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



[cassandra] 01/01: Merge branch cassandra-4.0 into trunk

2021-07-30 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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

commit e9ab8f3193282a762e338ca637475a389fa157b8
Merge: f661824 f09ef63
Author: Benjamin Lerer 
AuthorDate: Fri Jul 30 12:24:17 2021 +0200

Merge branch cassandra-4.0 into trunk

 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/utils/NativeLibrary.java | 4 
 2 files changed, 5 insertions(+)


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



[cassandra] branch trunk updated (f661824 -> e9ab8f3)

2021-07-30 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from f661824  Batch the token metadata update to improve the speed
 add e399dea  Handle properly UnsatisfiedLinkError in 
NativeLibrary#getProcessID()
 add a88f4b3  Merge branch cassandra-3.0 into cassandra-3.11
 add f09ef63  Merge branch cassandra-3.11 into cassandra-4.0
 new e9ab8f3  Merge branch cassandra-4.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 +
 src/java/org/apache/cassandra/utils/NativeLibrary.java | 4 
 2 files changed, 5 insertions(+)

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



[cassandra] branch cassandra-4.0 updated (bc51c57 -> f09ef63)

2021-07-30 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from bc51c57  Merge branch 'cassandra-3.11' into cassandra-4.0
 add e399dea  Handle properly UnsatisfiedLinkError in 
NativeLibrary#getProcessID()
 add a88f4b3  Merge branch cassandra-3.0 into cassandra-3.11
 add f09ef63  Merge branch cassandra-3.11 into cassandra-4.0

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/utils/NativeLibrary.java | 4 
 2 files changed, 5 insertions(+)

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



[cassandra] branch trunk updated: Batch the token metadata update to improve the speed

2021-07-30 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new f661824  Batch the token metadata update to improve the speed
f661824 is described below

commit f66182415b5a778f1420777fd87a345b8942bc3f
Author: Jay Zhuang 
AuthorDate: Thu Jul 29 15:13:19 2021 +0200

Batch the token metadata update to improve the speed

patch by Jay Zhuang; reviewed by Benjamin Lerer and Brandon Williams for
CASSANDRA-15291
---
 CHANGES.txt|  1 +
 .../apache/cassandra/locator/TokenMetadata.java| 55 +++---
 .../apache/cassandra/service/StorageService.java   |  9 ++--
 3 files changed, 45 insertions(+), 20 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 10f39a6..c41bfac 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * Batch the token metadata update to improve the speed (CASSANDRA-15291)
  * Reduce the log level on "expected" repair exceptions (CASSANDRA-16775)
  * Make JMXTimer expose attributes using consistent time unit (CASSANDRA-16760)
  * Remove check on gossip status from DynamicEndpointSnitch::updateScores 
(CASSANDRA-11671)
diff --git a/src/java/org/apache/cassandra/locator/TokenMetadata.java 
b/src/java/org/apache/cassandra/locator/TokenMetadata.java
index f2bbb9f..1e7a22f 100644
--- a/src/java/org/apache/cassandra/locator/TokenMetadata.java
+++ b/src/java/org/apache/cassandra/locator/TokenMetadata.java
@@ -182,8 +182,7 @@ public class TokenMetadata
 public void updateNormalTokens(Collection tokens, 
InetAddressAndPort endpoint)
 {
 Multimap endpointTokens = 
HashMultimap.create();
-for (Token token : tokens)
-endpointTokens.put(endpoint, token);
+endpointTokens.putAll(endpoint, tokens);
 updateNormalTokens(endpointTokens);
 }
 
@@ -250,23 +249,24 @@ public class TokenMetadata
 lock.writeLock().lock();
 try
 {
-InetAddressAndPort storedEp = 
endpointToHostIdMap.inverse().get(hostId);
-if (storedEp != null)
-{
-if (!storedEp.equals(endpoint) && 
(FailureDetector.instance.isAlive(storedEp)))
-{
-throw new RuntimeException(String.format("Host ID 
collision between active endpoint %s and %s (id=%s)",
- storedEp,
- endpoint,
- hostId));
-}
-}
+updateEndpointToHostIdMap(hostId, endpoint);
+}
+finally
+{
+lock.writeLock().unlock();
+}
 
-UUID storedId = endpointToHostIdMap.get(endpoint);
-if ((storedId != null) && (!storedId.equals(hostId)))
-logger.warn("Changing {}'s host ID from {} to {}", endpoint, 
storedId, hostId);
+}
 
-endpointToHostIdMap.forcePut(endpoint, hostId);
+public void updateHostIds(Map 
hostIdToEndpointMap)
+{
+lock.writeLock().lock();
+try
+{
+for (Map.Entry entry : 
hostIdToEndpointMap.entrySet())
+{
+updateEndpointToHostIdMap(entry.getKey(), entry.getValue());
+}
 }
 finally
 {
@@ -274,6 +274,27 @@ public class TokenMetadata
 }
 
 }
+
+private void updateEndpointToHostIdMap(UUID hostId, InetAddressAndPort 
endpoint)
+{
+InetAddressAndPort storedEp = 
endpointToHostIdMap.inverse().get(hostId);
+if (storedEp != null)
+{
+if (!storedEp.equals(endpoint) && 
(FailureDetector.instance.isAlive(storedEp)))
+{
+throw new RuntimeException(String.format("Host ID collision 
between active endpoint %s and %s (id=%s)",
+ storedEp,
+ endpoint,
+ hostId));
+}
+}
+
+UUID storedId = endpointToHostIdMap.get(endpoint);
+if ((storedId != null) && (!storedId.equals(hostId)))
+logger.warn("Changing {}'s host ID from {} to {}", endpoint, 
storedId, hostId);
+
+endpointToHostIdMap.forcePut(endpoint, hostId);
+}
 
 /** Return the unique host ID for an end-point. */
 public UUID getHostId(InetAddressAndPort endpoint)
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 14c54e0..f4978f9 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/o

[cassandra] branch trunk updated: MerkleTrees variables renaming tree -> trees.

2021-07-28 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
 new fd5dcc5  MerkleTrees variables renaming tree -> trees.
fd5dcc5 is described below

commit fd5dcc51cb09041585fa16c24149d0a66e415b54
Author: xiang.wang 
AuthorDate: Mon Jul 19 17:32:12 2021 +0400

MerkleTrees variables renaming tree -> trees.

Patch by Xiang Wang; reviewed by Aleksei Zotov, Benjamin Lerer and 
Ekaterina Dimitrova
---
 .../apache/cassandra/repair/ValidationManager.java | 12 +++
 .../org/apache/cassandra/repair/Validator.java | 22 ++--
 .../org/apache/cassandra/utils/MerkleTrees.java| 10 +++---
 .../apache/cassandra/repair/LocalSyncTaskTest.java |  8 ++---
 .../org/apache/cassandra/repair/RepairJobTest.java | 12 +++
 .../org/apache/cassandra/repair/ValidatorTest.java | 16 -
 .../repair/asymmetric/DifferenceHolderTest.java| 42 +++---
 .../cassandra/service/SerializationsTest.java  | 14 
 8 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/src/java/org/apache/cassandra/repair/ValidationManager.java 
b/src/java/org/apache/cassandra/repair/ValidationManager.java
index 7f3c0df..1b6ef56 100644
--- a/src/java/org/apache/cassandra/repair/ValidationManager.java
+++ b/src/java/org/apache/cassandra/repair/ValidationManager.java
@@ -49,7 +49,7 @@ public class ValidationManager
 
 private static MerkleTrees createMerkleTrees(ValidationPartitionIterator 
validationIterator, Collection> ranges, ColumnFamilyStore cfs)
 {
-MerkleTrees tree = new MerkleTrees(cfs.getPartitioner());
+MerkleTrees trees = new MerkleTrees(cfs.getPartitioner());
 long allPartitions = validationIterator.estimatedPartitions();
 Map, Long> rangePartitionCounts = 
validationIterator.getRangePartitionCounts();
 
@@ -73,15 +73,15 @@ public class ValidationManager
: 0;
 // determine tree depth from number of partitions, capping at max 
tree depth (CASSANDRA-5263)
 int depth = numPartitions > 0 ? (int) 
Math.min(Math.ceil(Math.log(numPartitions) / Math.log(2)), maxDepth) : 0;
-tree.addMerkleTree((int) Math.pow(2, depth), range);
+trees.addMerkleTree((int) Math.pow(2, depth), range);
 }
 if (logger.isDebugEnabled())
 {
 // MT serialize may take time
-logger.debug("Created {} merkle trees with merkle trees size {}, 
{} partitions, {} bytes", tree.ranges().size(), tree.size(), allPartitions, 
MerkleTrees.serializer.serializedSize(tree, 0));
+logger.debug("Created {} merkle trees with merkle trees size {}, 
{} partitions, {} bytes", trees.ranges().size(), trees.size(), allPartitions, 
MerkleTrees.serializer.serializedSize(trees, 0));
 }
 
-return tree;
+return trees;
 }
 
 private static ValidationPartitionIterator 
getValidationIterator(TableRepairManager repairManager, Validator validator) 
throws IOException, NoSuchRepairSessionException
@@ -112,11 +112,11 @@ public class ValidationManager
 long estimatedTotalBytes = 0;
 try (ValidationPartitionIterator vi = 
getValidationIterator(cfs.getRepairManager(), validator))
 {
-MerkleTrees tree = createMerkleTrees(vi, validator.desc.ranges, 
cfs);
+MerkleTrees trees = createMerkleTrees(vi, validator.desc.ranges, 
cfs);
 try
 {
 // validate the CF as we iterate over it
-validator.prepare(cfs, tree);
+validator.prepare(cfs, trees);
 while (vi.hasNext())
 {
 try (UnfilteredRowIterator partition = vi.next())
diff --git a/src/java/org/apache/cassandra/repair/Validator.java 
b/src/java/org/apache/cassandra/repair/Validator.java
index 4e50d60..2fe2703 100644
--- a/src/java/org/apache/cassandra/repair/Validator.java
+++ b/src/java/org/apache/cassandra/repair/Validator.java
@@ -100,21 +100,21 @@ public class Validator implements Runnable
 this.evenTreeDistribution = evenTreeDistribution;
 }
 
-public void prepare(ColumnFamilyStore cfs, MerkleTrees tree)
+public void prepare(ColumnFamilyStore cfs, MerkleTrees trees)
 {
-this.trees = tree;
+this.trees = trees;
 
-if (!tree.partitioner().preservesOrder() || evenTreeDistribution)
+if (!trees.partitioner().preservesOrder() || evenTreeDistribution)
 {
-// You can't beat an even tree distribution for md5
-tree.init();
+// You can't beat even trees distribution for md5
+trees.init();
 }
 else
 {
 List keys = new ArrayList<>();
 Random random = new Random();
 
- 

[cassandra] branch cassandra-3.11 updated (b60f4fe -> 0173464)

2021-07-16 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from b60f4fe  Merge branch 'cassandra-3.0' into cassandra-3.11
 add 44604b7  Reject token() in MV WHERE clause
 add 0173464  Merge branch cassandra-3.0 into cassandra-3.11

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt  |  1 +
 src/java/org/apache/cassandra/cql3/WhereClause.java  | 16 
 .../cassandra/cql3/statements/CreateViewStatement.java   |  3 +++
 test/unit/org/apache/cassandra/cql3/ViewSchemaTest.java  | 15 +++
 4 files changed, 35 insertions(+)

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



[cassandra] branch trunk updated (e16cacc -> 42ddac3)

2021-07-16 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

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


from e16cacc  Merge branch 'cassandra-4.0' into trunk
 add 44604b7  Reject token() in MV WHERE clause
 add 0173464  Merge branch cassandra-3.0 into cassandra-3.11
 add 5adc310  Merge branch cassandra-3.11 into cassandra-4.0
 new 42ddac3  Merge branch 'cassandra-4.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 +
 src/java/org/apache/cassandra/cql3/WhereClause.java  | 16 
 .../cql3/statements/schema/CreateViewStatement.java  |  2 ++
 test/unit/org/apache/cassandra/cql3/ViewSchemaTest.java  | 15 +++
 test/unit/org/apache/cassandra/cql3/ViewTest.java|  4 +---
 5 files changed, 35 insertions(+), 3 deletions(-)

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



  1   2   3   4   5   6   7   8   9   10   >