Commit Graph

14974 Commits

Author SHA1 Message Date
Stefan Miklosovic 035a220d55
Implementation of CEP-55 - Generation of role names
patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20897
2025-10-23 13:53:56 +02:00
blambov 9cc3c085de Merge branch 'cassandra-5.0' into trunk 2025-10-20 16:30:49 +03:00
blambov 1db6f54925 Fix range queries on early-open BTI files
patch by Branimir Lambov; reviewed by Stefan Miklosovic for CASSANDRA-20976
2025-10-20 16:28:01 +03:00
Marcus Eriksson 0afa31cd5c Merge branch 'cassandra-5.0' into trunk 2025-10-14 13:21:30 +02:00
Marcus Eriksson e721705152 Avoid re-initializing underlying iterator in LazilyInitializedUnfilteredRowIterator after closing
Patch by marcuse; reviewed by Aleksey Yeschenko and Branimir Lambov for CASSANDRA-20972
2025-10-14 13:19:51 +02:00
Caleb Rackliffe 11278547e1 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Flush SAI segment builder when current SSTable writer is switched
2025-10-13 15:45:20 -05:00
Caleb Rackliffe 98e7cd5d99 Flush SAI segment builder when current SSTable writer is switched
patch by Pranav Shenoy; reviewed by Caleb Rackliffe and Zhao Yang for CASSANDRA-20752
2025-10-13 15:17:27 -05:00
Shalni Sundram accdaaebdd Add cqlsh autocompletion for the identity mapping feature
Patch by Shalni Sundram; reviewed by Francisco Guerrero, Bernardo Botella for CASSANDRA-20021
2025-10-09 16:50:32 -07:00
Aparna Naik 61959e215c Add DDL Guardrail enabling administrators to disallow creation/modification of keyspaces with durable_writes = false
patch by Aparna Naik; reviewed by Caleb Rackliffe and Stefan Miklosovic for CASSANDRA-20913
2025-10-02 15:50:31 -05:00
Dmitry Konstantinov e6a97025bd Optimize Counter, Meter and Histogram metrics using thread local counters
Codahale metrics do not provide the ability to create custom metric implementations, so we have to inherit from Codahale classes.
For better cache locality rate and counter values are extracted to a common thread-local arrays.
Threads death is tracked using 2 approaches: FastThreadLocal.onRemoval callback and phantom references to Thread objects.
Phantom references are used to track aliveness of metric users and reusing of metric IDs.

Patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith for CASSANDRA-20250
2025-09-28 16:47:50 +01:00
Stefan Miklosovic a94736ca50
Update snakeyaml to 2.4
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20928
2025-09-26 20:07:57 +02:00
Stefan Miklosovic 7b4fbde8e4
Update Netty to 4.1.125.Final
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20925
2025-09-26 13:13:58 +02:00
Stefan Miklosovic 608a1b59e2
Merge branch 'cassandra-5.0' into trunk 2025-09-24 10:25:23 +02:00
Stefan Miklosovic b23db408c5
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-09-24 10:22:16 +02:00
Stefan Miklosovic 4a201d4f6f
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-09-24 10:20:21 +02:00
Yifan Cai 90f231ad56
Fixed incorrect error message constant for keyspace name length validation
patch by Yifan Cai; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-20915
2025-09-24 10:13:04 +02:00
Stefan Miklosovic 09c7a3eff0
Merge branch 'cassandra-5.0' into trunk 2025-09-24 09:44:15 +02:00
Stefan Miklosovic 3888949bda
Throw RTE instead of FSError when RTE is thrown from FileUtis.write in TOCComponent
Also simplify the logic in TOCComponent.loadOrCreate.

patch by Stefan Miklosovic; reviewed by Caleb Rackliffe for CASSANDRA-20917
2025-09-24 09:28:46 +02:00
Stefan Miklosovic e42599a094
Expose uncaught exceptions in system_views.uncaught_exceptions table
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-20858
2025-09-23 13:52:00 +02:00
Stefan Miklosovic 02ef8f8a0d
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-09-19 14:18:29 +02:00
Stefan Miklosovic d966547d01
update shaded cassandra-driver-core to 3.11.5
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20904
2025-09-19 14:12:00 +02:00
Raymond Huffman a52d2ce783
Update jackson-dataformat-yaml to 2.19.2 and snakeyaml to 2.1
This is backport of CASSANDRA-18875 to 5.0 where we upgrade 2.1 of snakeyaml and bump jackson-dataformat-yaml to 2.19.2.

The change in trunk (5.1) is about excluding Jackson dependencies from wiremock so 2.19.2 of Jackson is used everywhere in test as well,
otherwise there would be Jackson annotations of 2.13.4 used.

patch by Raymond Huffman; reviewed by Mick Semb Wever and Stefan Miklosovic for CASSANDRA-18875

Co-authored-by: Griffin Davis <gcd@ibm.com>
2025-09-19 13:29:05 +02:00
Stefan Miklosovic 818de8e11e
Merge branch 'cassandra-5.0' into trunk 2025-09-19 12:05:59 +02:00
Marko Tsymbaluk b26e33d506
Represent complex settings as JSON on system_views.settings table
The patch for 5.0 is preserving old behavior, it is possible to turn on JSON representation by a system property.
The patch for trunk is by default transforming collections to JSON string but there is the property (same as in 5.0) which has default to be set to true.

patch by Marko Tsymbaluk; reviewed by Paulo Motta, Stefan Miklosovic for CASSANDRA-20827

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-09-19 11:58:23 +02:00
jaydeepkumar1984 bf2c1c124e Improved observability in AutoRepair to report both expected vs. actual repair bytes and expected vs. actual keyspaces
patch by Jaydeepkumar Chovatia; reviewed by Chris Lohfink for CASSANDRA-20581
2025-09-16 20:38:39 -07:00
Maxwell Guo dddbe1ad87 Execution of CreateTriggerStatement should not rely on external state
patch by Maxwell Guo; reviewed by Sam Tunnicliffe for CASSANDRA-20287
2025-09-15 17:49:05 +08:00
Pranav Shenoy cf806cac1a Support LIKE expressions in filtering queries
patch by Pranav Shenoy; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-17198
2025-09-11 11:20:20 -05:00
Dmitry Konstantinov 06440e947a Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Prevent too long table names not fitting file names
2025-09-10 23:39:17 +01:00
Dmitry Konstantinov 7f92e1ac2c Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Prevent too long table names not fitting file names
2025-09-10 23:09:58 +01:00
Dmitry Konstantinov bff43df7db Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Prevent too long table names not fitting file names
2025-09-10 22:59:34 +01:00
Ruslan Fomkin 6c29686ea7 Prevent too long table names not fitting file names
The length of table names was not controlled. This is likely due to
confusion between validation methods with similar names. As result
creating tables with too long names led to the too long file name
exceptions during table creations.

This commit adds a validation of table name lengths to avoid the too
long file name errors. The validation length is based on how the table
name is used to create file/directory names, and needs to be exact to
prevent the too long file name exception, but allow all other table
names, which didn't lead to the too long file name exception. This
length limit is different from the existing name length limit of 48
characters used by common validation functions.

Thus, this commit moves out the length validation from the validation
methods into a separate length validation method, so the errors on
names are more specific. The non-length validation methods combined
into a single method, which checks for empty names and valid characters.

New constants are added for the length limits.

Table name related code are moved into methods in TableMetadata class,
so their semantics are more clear and to allow reuse, e.g., in
asserting the table name length constant.
Tests are added for the long table names and non-alphanumeric names.

Keyspace name validation function is now shared between two classes and
a unit test of it is added.

Patch by Ruslan Fomkin; reviewed by Piotr Kołaczkowski, Dmitry
Konstantinov, Maxwell Guo for CASSANDRA-20389
2025-09-10 22:48:43 +01:00
Marcus Eriksson 55db3181fb Make legacy index rebuilds safe on Gossip -> TCM upgrades
patch by Caleb Rackliffe; reviewed by Marcus Eriksson for CASSANDRA-20887

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Marcus Eriksson <marcuse@apache.org>
2025-09-09 13:59:26 -05:00
Caleb Rackliffe ed00bf9a93 Minor improvements and hardening for IndexHints
- Enforce a more reasonable limit on the number of included/excluded indexes
- Serialize vints rather than shorts in IndexSetSerializer
- Return Iterable from notExcluded() to avoid set creation
- Avoid redundant iteration in MessagingService#endpointsWithConnectionsOnVersionBelow()

patch by Caleb Rackliffe; reviewed by Marcus Eriksson for CASSANDRA-20888
2025-09-09 11:04:42 -05:00
Himanshu Jindal 965a39166c Stop repair scheduler if two major versions are detected
patch by Himanshu Jindal; reviewed by Jaydeepkumar Chovatia, Andy Tolbert for CASSANDRA-20048
2025-09-08 09:26:31 -07:00
Dmitry Konstantinov ecaa650a50
Optimize audit logic for batch operations especially when audit is not enabled for DML
Avoid audit batch event creation if audit for batch is not enabled (random UIID generation is not very cheap)
Avoid String.format in a potential hot path

Patch by Dmitry Konstantinov; reviewed by Štefan Miklošovič for CASSANDRA-20885
Co-authored-by: Štefan Miklošovič
2025-09-08 16:40:44 +02:00
Stefan Miklosovic 9c93d52ac9
Implement nodetool history
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-20851
2025-09-01 16:18:19 +02:00
Stefan Miklosovic 63fb8741b8
Merge branch 'cassandra-5.0' into trunk 2025-09-01 13:00:36 +02:00
Stefan Miklosovic e45a330f54
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-09-01 12:53:53 +02:00
Stefan Miklosovic c9717b4ed5
Redact security-sensitive information in system_views.settings
patch by Stefan Miklosovic; reviewed by Maxwell Guo, Francisco Guerrero for CASSANDRA-20856
2025-09-01 12:44:43 +02:00
Paulo Motta 06f7f5e265 Merge branch 'cassandra-5.0' into trunk 2025-08-29 14:02:21 -04:00
Paulo Motta c5d6a36fa7 Expose StorageService.dropPreparedStatements via JMX
Patch by Paulo Motta; Reviewed by Dmitry Konstantinov, Jeremiah Jordan for CASSANDRA-20870
2025-08-29 14:00:03 -04:00
Isaac Reath f41b625e48 Expose Metric for Prepared Statement Cache Size (in bytes)
Patch by Isaac Reath; Reviewed by Paulo Motta and guo Maxwell for
CASSANDRA-20864

Closes #4345
2025-08-28 10:54:00 -04:00
Stefan Miklosovic 792e823af0
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-27 19:01:31 +02:00
Dmitry Konstantinov 1c5286f4d1
Fix IndexOutOfBoundsException in sstablemetadata tool when a range tombstone is a max clustering value
patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20855
2025-08-27 18:54:10 +02:00
David Capwell 61b3d5a54b Add support for BEGIN TRANSACTION to allow mutations that touch multiple partitions
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20857
2025-08-25 16:09:28 -07:00
Stefan Miklosovic 9598a96512
Merge branch 'cassandra-5.0' into trunk 2025-08-25 17:44:58 +02:00
Stefan Miklosovic af0197e195
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-25 17:41:43 +02:00
Stefan Miklosovic 6c068b999f
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-25 17:38:44 +02:00
Stefan Miklosovic f9dbfd431e
Update Jackson to 2.19.2
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20848
2025-08-25 17:34:38 +02:00
Stefan Miklosovic 7c6ae891e7
Merge branch 'cassandra-5.0' into trunk 2025-08-25 17:28:31 +02:00