Commit Graph

489 Commits

Author SHA1 Message Date
Stefan Miklosovic 15a6bac06d
Merge branch 'cassandra-5.0' into cassandra-6.0 2026-07-20 20:45:18 +02:00
Stefan Miklosovic bd345213c1
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-07-20 20:43:56 +02:00
Stefan Miklosovic 1c702382de
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-07-20 20:42:36 +02:00
Jeremiah Jordan 26d7b166ba
Verify extension type before initializing reflectively-loaded classes
Cassandra resolves pluggable extensions by class name from configuration, schema, and tooling
inputs. These names were loaded with an initializing Class.forName(name) and type-checked only
afterward, so the named class ran its static initializer before its type was confirmed. After this
change such classes will be loaded without initialization, verified against the expected interface or
base class, and initialized only through normal use after validation.

A shared FBUtilities.classForNameWithoutInitialization helper and typed
instanceOrConstruct/construct overloads apply this to the configurable extension points loaded by
class name: the authentication, authorization, role-management, network and
internode-authenticator backends, the partitioner, audit logger, configuration loader, seed provider,
snitch, abstract types, secondary and custom indexes, compaction strategy, compressor, replication
strategy, SASI analyzers, key and cache providers, query handler, storage and stream hooks, tracing,
the JMX authorization proxy, MBeans, the monotonic clock, nodetool Sjk, triggers, the
sstableloader and stress class options, and diagnostic event classes (loaded without initialization
and checked against DiagnosticEvent, preserving the InvalidClassException contract and the existing
package restriction).

Regression tests confirm that an invalid-type load is rejected without initializing the target
class, and that valid implementations still resolve.

Hadoop client integration and hard-coded JDK and internal class probes are left unchanged.

patch by Jeremiah Jordan; reviewed by Stefan Miklosovic for CASSANDRA-21525
2026-07-20 20:03:45 +02:00
Dmitry Konstantinov 0d2160631a Avoid ByteBuffer wrapping in cql3.selection.Selector.InputRow to reduce memory allocation rate
Current ReadCommand logic returns ArrayCell values, so when we retrieve a cell value as a ByteBuffer we allocate ByteBuffer instances

patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21362
2026-06-04 19:19:36 +01:00
Benedict Elliott Smith 7623a59b31 Accord: Deterministic time integration
- now() functions must be deterministic (and derived from Accord timestamp)
 - tombstone GC and TTL evaluation must be deterministic and based on both Accord timestamp and Accord GC mechanisms (that guarantee completeness of execution)

patch by Benedict; reviewed by Alex Petrov and Ariel Weisberg for CASSANDRA-21376
2026-05-18 13:19:25 +01:00
jkonisa 03dc5a061c
Update cassandra-stress to support TLS 1.3 by default by auto-negotiation
This is a backport of 9d89b47c68 to cassandra-5.0 branch.

patch by Rishabh Saraswat; reviewed by Jyothsna Konisa, Brad Schoening for CASSANDRA-21007
2026-04-02 16:52:53 +02:00
Maxim Muzafarov 3dc33de6ea
Organize imports and standartize import order across entire codebase
Patch by Maxim Muzafarov; Reviewed by Michael Semb Wever for CASSANDRA-17925
2025-12-30 22:34:14 +01:00
Rishabh Saraswat 9d89b47c68 Update cassandra-stress default cipher suites to support tls 1.3
patch by Rishabh Saraswat; reviewed by Jyothsna Konisa, Brad Schoening for CASSANDRA-21007
2025-12-15 13:04:54 -08:00
Marcus Eriksson e1e39b074a Refactor the way we check if a transformation is allowed to be committed during upgrades
Patch by marcuse and Sam Tunnicliffe; reviewed by Sam Tunnicliffe for CASSANDRA-21043

Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2025-12-01 10:39:25 +01: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
Maxim Muzafarov 94b251f3ce
Migrate all nodetool commands from airline to picocli
Replace io.airlift:airline dependency with info.picocli:picocli across
all nodetool command implementations. This migration includes:

- Convert 160+ nodetool command classes from airline to picocli
- Add AbstractCommand base class for commands and utility methods
- Add NodetoolCommand top-level class for the cli utility
- Update all command classes to use @Command, @Option, and @Parameters
- Add plain text files to test command help output
- Add mock test classes for improved test coverage and parse validation
- Modify test infrastructure to work with picocli-based commands
- Add new layouts for cli formatting to preserve backwards compatibility

The migration maintains backward compatibility while providing improved
command-line parsing, better help system, and more robust argument
validation through picocli enhanced features.

patch by Maxim Muzafarov; reviewed by Caleb Rackliffe, Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-17445
2025-07-26 18:19:18 +02:00
maulin-vasavada bcea8f5815
Refactor EncryptionOptions to use client / server encryption options builders
patch by Maulin Vasavada; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-20404
2025-04-23 09:27:09 +02:00
Benedict Elliott Smith 8de3dfc711 CASSANDRA-18365: Protocol fixes 2025-04-17 11:59:49 -07:00
Blake Eggleston 09c8fa1030 CEP-15 (C*): Messaging and storage engine integration
patch by Blake Eggleston; reviewed by Benedict Elliott Smith, David Capwell for CASSANDRA-17103
2025-04-17 11:59:47 -07:00
Branimir Lambov 54e4688069 Parallelized UCS compactions
patch by Branimir Lambov, reviewed by Sylvain Lebresne for CASSANDRA-18802
2024-12-11 17:37:09 +02:00
Stefan Miklosovic f410b0fa0b
Consolidate all snapshot management to SnapshotManager
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-18111
2024-12-11 02:51:29 +01:00
Ata İlhan Köktürk 46b36f23cd
Explicitly localize strings to Locale.US for internal implementation
There is inconsistent usage of toLowerCase/toUpperCase methods in the codebase.
Somewhere we already use Locale.US, somewhere not. That might cause various issues in runtime
as shown in CASSANDRA-19953 ticket when an environment Cassandra runs in has different locale from expected.
In this patch, all such method calls explicitly set their locale to Locale.US. This patch also contains
a checkstyle rule which fails the compilation if toLowerCase or toUpperCase is used.
We prefer calls to methods in LocalizeString class which use US locale.

patch by Ata İlhan Köktürk; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-19953

Co-authored-by: Maxwell Guo <cclive1601@gmail.com>
Co-authored-by: Stefan Miklosovic <smiklosovic@apacheorg>
2024-10-29 08:58:01 +01:00
Stefan Miklosovic 08b2e80aab
Warn about unqualified prepared statement only if it is select or modification statement
patch by Stefan Miklosovic; reviewed by Benjamin Lerer for CASSANDRA-18322
2024-08-08 14:18:24 +02:00
Ekaterina Dimitrova 757dbf076b Refactor ColumnCondition
Patch by Ekaterina Dimitrova; review by Benjamin Lerer for CASSANDRA-19620
2024-07-25 10:22:38 +02:00
Marcus Eriksson 5d4bcc797a Avoid exposing intermediate state while replaying log during startup
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-19384
2024-03-08 12:52:42 +01:00
Alex Petrov 6b3958f1d8 Improve setup and initialisation of LocalLog/LogSpec
Patch by Alex Petrov; reviewed by Sam Tunnicliffe and marcuse for CASSANDRA-19271
2024-02-09 15:49:42 +01:00
Jyothsna Konisa bfcb21fbeb Set right client auth for creating SSL context in mTLS optional mode
patch by Jyothsna Konisa; reviewed by Francisco Guerrero, Jon Meredith for CASSANDRA-18811
2023-12-19 13:54:28 -07:00
Brandon Williams 7204bc45b6 Revert "Revert "Upgrade jackson to 2.15.3 and snakeyaml to 2.1""
This reverts commit 8cd0690c0b.
2023-12-01 13:15:07 -06:00
Brandon Williams 8cd0690c0b Revert "Upgrade jackson to 2.15.3 and snakeyaml to 2.1"
This reverts commit 64ae866095.
2023-12-01 11:11:31 -06:00
Yifan Cai cbabfd39b1 Merge branch 'cassandra-5.0' into trunk 2023-11-30 17:48:23 +08:00
Yifan Cai 9dc0378c2f Merge branch 'cassandra-4.1' into cassandra-5.0 2023-11-30 17:45:45 +08:00
Yifan Cai 350e968565 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-30 17:44:07 +08:00
Yifan Cai 50273d98e4 Support max SSTable size in sorted CQLSSTableWriter
patch by Yifan Cai; reviewed by Alex Petrov, Francisco Guerrero, Maxwell Guo for CASSANDRA-18941
2023-11-30 17:39:00 +08:00
Raymond Huffman 64ae866095 Upgrade jackson to 2.15.3 and snakeyaml to 2.1
Patch by Raymond Huffman; reviewed by brandonwilliams and smiklosovic
for CASSANDRA-18875
2023-11-29 16:50:02 -06:00
Stefan Miklosovic 97bee6abc1
Merge branch 'cassandra-5.0' into trunk 2023-11-29 17:52:09 +01:00
Stefan Miklosovic bfd93eafdd
Merge branch 'cassandra-4.1' into cassandra-5.0 2023-11-29 17:48:36 +01:00
Stefan Miklosovic e8b638c2ae
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-29 17:47:18 +01:00
dmi0 0f2af6ab3f
Fix cassandra-stress in simplenative mode with prepared statements
patch by Dmitry Bychkov; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18744
2023-11-29 17:45:15 +01:00
Sam Tunnicliffe ae0842372f Implementation of Transactional Cluster Metadata as described in CEP-21
An overview of the core components can be found in the included
TransactionalClusterMetadata.md

patch by Alex Petrov, Marcus Eriksson and Sam Tunnicliffe; reviewed by
Alex Petrov, Marcus Eriksson and Sam Tunnicliffe for CASSANDRA-18330

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2023-11-24 10:26:08 +00:00
Jacek Lewandowski 4d61359c21 CASSANDRA-18785: Add support for Sonar analysis
Patch by Jacek Lewandowski; reviewed by Brandon Williams, Maxim Muzafarov, Michael Semb Wever, Stefan Miklosovic for CASSANDRA-18785
2023-11-13 14:48:28 +01:00
Stefan Miklosovic b9f614f7e5
Remove deprecated properties in CompressionParams
This patch removes deprecated chunk_length_kb and sstable_compression in favor of
chunk_length_in_kb and class parameters.

The only deprecated compression parameter left, crc_check_chance (which is configurable outside
of compression parameters as a standalone table parameter) is meant to be treated separately.

patch by Stefan Miklosovic; reviewed by Maxim Muzafarov and Brandon Williams for CASSANDRA-18742
2023-09-29 15:19:12 +02:00
timothytu12 75f7ec7fa5
Remove legacy command line options from cassandra-stress
Also, -mode option has "native" and "cql3" as defaults and they do not need to be specified

patch by Timothy Tu; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18529
2023-08-09 23:16:36 +02:00
Ekaterina Dimitrova 1c7e7db2d0 Fix BulkLoader ignoring cipher suites options.
patch by Dan Jatnieks; reviewed by Ekaterina Dimitrova and Jon Meredith for CASSANDRA-18582
2023-08-01 14:38:01 -04:00
Ekaterina Dimitrova fb7e4e7c48 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-01 13:59:52 -04:00
Daniel Jatnieks 4a2a585ec0 Fix BulkLoader ignoring cipher suites options.
patch by Dan Jatnieks; reviewed by Ekaterina Dimitrova and Jon Meredith for CASSANDRA-18582
2023-08-01 13:49:29 -04:00
Branimir Lambov 957eca2fb5 Implementation of the Unified Compaction Strategy as described in CEP-26
The approach is documented in the included UnifiedCompactionStrategy.md.

Also included:
- Generalize prettyPrint to prettyPrintBinary (with 2^10 multiplier,
  e.g. MiB) and prettyPrintDecimal (with 1000 multiplier, e.g. ms)
  that cover the full range of double, and add a parseHumanReadable
  method that can read both.

- CASSANDRA-18123: Fix invalid reuse of metadata collector during flushing

- Fix invalid token range splitting with non-unit weights

- Add flushSizeOnDisk metric

- Add ability to change compaction default in YAML

patch by Alex Sorokoumov, Branimir Lambov, Dimitar Dimitrov and Stefania Alborghetti
reviewed by Alex Sorokoumov, Jaroslaw Grabowski and Maxwell Guo for CASSANDRA-18397
2023-07-19 11:22:32 +03:00
mghildiy 7998e22127
Enhance nodetool compactionstats with additional metrics
patch by Manish Ghildiyal; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-18305

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2023-06-23 11:14:55 +02:00
Andrés de la Peña 4f3cb5de37 Avoid unnecessary deserialization of terminal arguments when executing CQL functions
patch by Benjamin Lerer and Andrés de la Peña; reviewed by Benjamin Lerer for CASSANDRA-18566

Co-authored-by: Benjamin Lerer <b.lerer@gmail.com>
Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
2023-06-12 13:32:02 +01:00
Stefan Miklosovic 18cc821e30
Print header and statistics for cassandra-stress output with arbitrary frequency
patch by Stefan Miklosovic; reviewed by Brandon Williams and Berenguer Blasi for CASSANDRA-12972
2023-05-30 21:30:00 +02:00
Stefan Miklosovic 4d2ee09ffa
Make cassandra-stress able to read all credentials from a file
As side-effect, this patch also introduces possibility to pass credentials to JMX.

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18544
2023-05-26 18:44:37 +02:00
Stefan Miklosovic edd35badaf
Merge branch 'cassandra-4.1' into trunk 2023-05-19 15:17:23 +02:00
Stefan Miklosovic f416a94125
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-19 15:15:11 +02:00
Stefan Miklosovic dc6ad3f6b1
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-05-19 15:11:03 +02:00
Stefan Miklosovic e1e88e5bc4
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-05-19 15:07:59 +02:00