Commit Graph

758 Commits

Author SHA1 Message Date
nickbar01234 585f89bb42
Support custom StartupCheck implementations via SPI
patch by Nick Bar; reviewed by Stefan Miklosovic, Jyothsna Konisa for CASSANDRA-21093

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2026-02-02 10:12:37 +11:00
ireath 7fe688b000 CASSANDRA-21024: Add configuration to disk usage guardrails to stop writes across all replicas of a keyspace when any node replicating that keyspace exceeds the disk usage failure threshold.
This commit adds a new configuration, data_disk_usage_keyspace_wide_protection_enabled, which ensures that if any node which replicates a given keyspace is full, all writes to that keyspace are blocked.

patch by Isaac Reath; reviewed by Stefan Miklosovic, Paulo Motta for CASSANDRA-20124

Closes #4547
2026-01-21 16:53:54 -05:00
Stefan Miklosovic 98ec8970e1
Move training parameters for Zstd dictionary compression to CQL
It is also possible to override them via nodetool if necessary.

This patch also fixes the computation of sampling ratio to not lose the precision.

patch by Stefan Miklosovic; reviewed by Jyothsna Konisha, Yifan Cai for CASSANDRA-21078
2026-01-07 16:21:47 +01:00
Alan Wang 25390eb8d5 Log queries scanning too many SSTables per read
patch by Alan Wang; reviewed by David Capwell, Marcus Eriksson for CASSANDRA-21048
2025-12-12 14:03:41 -08:00
jkonisa b11633be4f CASSANDRA-20943 Introducing comments and security labels for schema elements 2025-11-19 11:32:50 -08:00
Yuqi Yan e621d8a6c1 Introduce separate GCInspector thresholds for concurrent GC events.
For GC like ShenandoahGC/ZGC etc., there are GC events that do not have STW pauses (Concurrent phases).
Operator might find it reasonable to use lower thresholds for events require STW pauses and higher thresholds for concurrent phases.
gc_concurrent_phase_log_threshold and gc_concurrent_phase_warn_threshold configuration options are introduced in cassandra.yaml

Patch by Yuqi Yan; reviewed by Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-20980
Co-authored-by: Stefan Miklosovic
2025-11-16 21:29:00 +00:00
Yifan Cai 307603a4ad Support ZSTD dictionary compression
patch by Yifan Cai; reviewed by Jon Haddad, Stefan Miklosovic for CASSANDRA-17021
2025-10-30 16:18:37 -07:00
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
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
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
Himanshu Jindal daef7b5b98 Safeguard Full repair against disk protection
As per CASSANDRA-20045, we want to prevent full repair against
disk full scenarios. Current protection exists only for incremental
repair. This change updates the config name to not be
incremental repair specific, using the Replace annotation.

patch by Himanshu Jindal; reviewed by David Capwell, Jaydeepkumar Chovatia for CASSANDRA-20045
2025-08-22 14:34:15 -07:00
jaydeepkumar1984 58d1cc9b1e Increasing default for auto_repair.sstable_upper_threshold considering large Cassandra tables 2025-04-29 09:36:19 -05:00
jaydeepkumar1984 6753fb49dc Automated Repair Inside Cassandra for CEP-37
patch by Jaydeepkumar Chovatia; reviewed by Andy Tolbert, Chris Lohfink, Francisco Guerrero, Kristijonas Zalys for CASSANDRA-19918
2025-04-23 11:04:36 -05:00
Stefan Miklosovic 8fcf309dad
Implement appender of slow queries to system_views.slow_queries table
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov, Bernardo Botella for CASSANDRA-13001
2025-04-23 09:28:22 +02:00
Ariel Weisberg 6c0ad476ed Miscellaneous migration test fixes
Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-20060
2025-04-17 11:59:53 -07:00
Benedict Elliott Smith 9ebce5d6df Redesign progress mechanisms to be memory efficient, use fewer messages and to resolve dependency chains promptly.
The SimpleProgressLog had a number of problems:

1. It polled for progress with no attempt to determine whether progress could realistically be made, so:
 - as the number of pending transactions grew, the proportion of useful work dropped (as many would be unable to make progress without earlier transactions completing)
 - each transaction in the chain could recover only on average 1/2 poll interval behind the last transaction to complete
2. It requested full transaction state from every replica on each attempt
3. It maintained a lot of in-memory state
4. Polling happened en-masse, allowing for little per-transaction control

We also separately maintained fairly expensive per-command listener state that negatively affected our command loading and caching.

The new DefaultProgressLog makes use of several new features: LocalListeners, RemoteListeners, Timers and Await messages.
 - LocalListeners provide a memory-efficient collection for managing each CommandStore<E2><80><99>s transaction listeners, with dedicated record keeping for inter-transaction relationships.
 - RemoteListeners provide a mechanism for request/response pairs that may be separated by longer than the normal Cassandra message timeout, and require minimal state on sender and recipient. This permits replicas to cheaply update their local state machine as soon as distributed information becomes available.

The DefaultProgressLog tracks each transaction with separate timers to handle per-transaction scheduling, backoff etc, and a succinct state machine. To reduce overhead correspondence is preferentially limited to a handful of replicas, and limited to the home shard where appropriate.

patch by Benedict; reviewed by Ariel Weisberg for CASSANDRA-19870
2025-04-17 11:59:51 -07:00
Blake Eggleston cb1a05c5d4 Schema based accord fast path configuration
Patch by Blake Eggleston; Reviewed by David Capwell and Alex Petrov for CASSANDRA-19009
2025-04-17 11:59:49 -07:00
Jacek Lewandowski dfd1e99fd1 CEP-15: Add Accord configuration stub
Patch by Jacek Lewandowski; reviewed by David Capwell for CASSANDRA-18221
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
Caleb Rackliffe 7b15f477f9 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Prioritize legacy 2i over SAI for columns with multiple indexes
2025-03-13 12:21:09 -05:00
Caleb Rackliffe 740d6d0805 Prioritize legacy 2i over SAI for columns with multiple indexes
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20334
2025-03-13 12:15:25 -05:00
maulin-vasavada 37fe4b679c
Provide keystore_password_file and truststore_password_file options to read credentials from a file
patch by Maulin Vasavada; reviewed by Stefan Miklosovic, Maxwell Guo for CASSANDRA-13428
2025-03-04 12:33:41 +01:00
Stefan Miklosovic 0bf51f6e48
Merge branch 'cassandra-5.0' into trunk 2025-02-22 08:07:56 +01:00
Daniel Lenski 027689ae48
Fix unparseable YAML in default cassandra.yaml when uncommented for downstream tooling
The presence of an extra space the `:` in `key: value` pairs
makes the default `conf/cassandra.yaml` file included in
this repository unparseable and non-functional for some downstream tooling.

patch by Daniel Lenski; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-20359
2025-02-22 08:05:23 +01:00
Bernardo Botella Corbi 95180bab15 Adds new size Guardrails
Patch by Bernardo Botella Corbi; Reviewed by Jordan West, Yifan Cai for CASSANDRA-19677
2025-02-17 12:28:55 -08:00
Dmitry Konstantinov d7258ac8f3
Add table metric PurgeableTombstoneScannedHistogram and a tracing event for scanned purgeable tombstones
patch by Dmitry Konstantinov; reviewed by Chris Lohfink, Stefan Miklosovic for CASSANDRA-20132
2025-01-27 22:10:20 +01:00
Abe Ratnofsky aa5b8e3d3f Periodically disconnect roles that are revoked or have LOGIN=FALSE set
patch by Abe Ratnofsky; reviewed by Bernardo Botella Corbi, Francisco Guerrero Hernandez, and Jon Meredith for CASSANDRA-19385
2025-01-14 12:40:44 -08:00
Sam Tunnicliffe 48dcf5e092 Snitch re-implementation
Deprecate IEndpointSnitch entirely, to be replaced with new interfaces:
* Locator for endpoint -> location mapping
* InitialLocationProvider to supply the DC & rack for registration
* NodeProximity for sorting endpoints and replicas at query time

For migration/upgrade/deprecation, nodes can still be configured with
an IEndpointSnitch implementation via endpoint_snitch in config, but
we hide this with a facade and only present the new interfaces.

Patch by Sam Tunnicliffe and Marcus Eriksson; reviewed by Sam
Tunnicliffe and Marcus Eriksson for CASSANDRA-19488

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2024-12-16 11:25:39 +00:00
Zhongxiang Zheng 2ff41551a6
Enable JMX server configuration to be in cassandra.yaml
patch by Zhongxiang Zheng; reviewed by Stefan Miklosovic, Maulin Vasavada, Cheng Wang, Jordan West for CASSANDRA-11695

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2024-12-16 11:01:29 +01:00
Maulin Vasavada 9131be9fa5
Make JMX SSL configurable in cassandra.yaml
patch by Maulin Vasavada; reviewed by Stefan Miklosovic, Doug Rohrer for CASSANDRA-18508
2024-11-23 10:40:13 +01:00
Stefan Miklosovic 7b33e91852
Merge branch 'cassandra-5.0' into trunk
configuration section for native_transport_max_auth_threads with default value of 4 was added to cassandra.yaml
as part of this merge-up as this section was forgotten to be added in the original patch of CASSANDRA-17812
2024-11-06 23:05:57 +01:00
Stefan Miklosovic a3f2771543
Merge branch 'cassandra-4.1' into cassandra-5.0
configuration section for native_transport_max_auth_threads with default value of 4 was added to cassandra.yaml
as part of this merge-up as this section was forgotten to be added in the original patch of CASSANDRA-17812
2024-11-06 23:02:53 +01:00
Stefan Miklosovic 0f590133f8
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-11-06 22:27:28 +01:00
Josh McKenzie 8ea70cd1f0
Backport of CASSANDRA-17812: Rate-limit new client connection auth setup to avoid overwhelming bcrypt
This backport differs from CASSANDRA-17812 in such a way that by default the number
of auth request threads is set to 0. That will route all requests to request executor as before this change.
The patch in 5.0 and later sets the default number of auth request threads to 4.

patch by Josh McKenzie; reviewed by Chris Lohfink for CASSANDRA-20057

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2024-11-06 22:23:16 +01:00
mck 5e884a9329
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add configurable batchlog endpoint strategies
2024-10-15 13:47:58 +02:00
mck dcff5a0fad
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add configurable batchlog endpoint strategies
2024-10-15 13:43:31 +02:00
mck 26bf80706b
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Add configurable batchlog endpoint strategies
2024-10-15 13:38:12 +02:00
shunsaker b8c5436293
Add configurable batchlog endpoint strategies
Batchlog endpoint strategy was previously only random placements on other racks.  Options now are random_remote, prefer_local, dynamic_remote, and dynamic.

 patch by Shayne Hunsaker; reviewed by Mick Semb Wever, Brandon Williams for CASSANDRA-18120
2024-10-15 13:34:40 +02:00
mck 1defa0851f
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Use ParameterizedClass for all auth-related implementations
2024-10-09 13:53:48 +02:00
Tiago Alves 2dea5c7588
Use ParameterizedClass for all auth-related implementations
Uses ParameterizedClass for IAuthorizer, INetworkAuthorizer, and
IRoleManager implementations enabling those to be configurable from
parameters specified directly in cassandra.yaml.

Opportunistically makes consistent the initialization and setting of
all auth-related implementations and removes code duplication.

Notes:
 * IInternodeAuthenticator implementations are expected to be set as
   default directly in DatabaseDescriptor instead of done via
   AuthConfig.applyAuth(). This is assumed in tests and client logic.
   For instance ReconnectableSnitchHelperTest fetches this authenticator
   before calling daemonInitialize(). Also, BulkLoader fetches this
   directly when creating an outbound connection.
 * Changing this behavior in BulkLoader causes a cascade of changes.
   First, one would need to add AuthConfig.applyAuth() directly in
   clientInitialize() and then would need to enable all the additional
   classes that this change causes. Long term this might be justified
   as if we're depending on the auth logic to be properly set. However,
   in the context of this change it was decided to postpone further
   changes.
 * Standardize auth-related configurations by using a short-form with
   the class name instead of the full qualified class name containing
   the package name.

 patch by Tiago Alves; reviewed by Mick Semb Wever, Stefan Miklosovic for CASSANDRA-19946
2024-10-09 13:51:51 +02:00
Francisco Guerrero 25291ff3fd Allow configuring log format for Audit Logs
patch by Francisco Guerrero; reviewed by Stefan Miklosovic, Andy Tolbert for CASSANDRA-19792
2024-07-24 15:03:18 -07:00
Stefan Miklosovic 42d18a83e4
Merge branch 'cassandra-5.0' into trunk 2024-07-15 15:52:43 +02:00
Stefan Miklosovic 10a98fe5aa
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-07-15 15:40:22 +02:00
Stefan Miklosovic 98a0b54c40
Support dictionary lookup for CassandraPasswordValidator
patch by Stefan Miklosovic; reviewed by Dinesh Joshi, Francisco Guerrero for CASSANDRA-19762
2024-07-15 11:09:57 +02:00
Stefan Miklosovic d336dda112
CEP-24 Password validation / generation
patch by Stefan Miklosovic; reviewed by Dinesh Joshi, Francisco Guerrero for CASSANDRA-17457
2024-07-08 23:32:09 +02:00
Caleb Rackliffe c33c8ebab4 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Optionally fail writes when SAI refuses to index a term value exceeding a configured maximum size
2024-04-17 11:29:43 -05:00
Caleb Rackliffe 9bfaee91c4 Optionally fail writes when SAI refuses to index a term value exceeding a configured maximum size
patch by Caleb Rackliffe; reviewed by Berenguer Blasi and Stefan Miklosovic for CASSANDRA-19493
2024-04-17 11:12:42 -05:00
Abe Ratnofsky 8d705b31e9
Add new TriggersPolicy configuration to allow operators to disable triggers
patch by Abe Ratnofsky; reviewed by Stefan Miklosovic and Sam Tunnicliffe for CASSANDRA-19532
2024-04-16 11:09:33 +02:00
Caleb Rackliffe 39bd3c2261 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Optionally avoid hint transfer during decommission
2024-04-08 15:28:06 -05:00
Caleb Rackliffe 0974a3656d Optionally avoid hint transfer during decommission
patch by Paul Chandler; reviewed by Caleb Rackliffe and Brandon Williams for CASSANDRA-19525
2024-04-08 15:22:10 -05:00