Commit Graph

1363 Commits

Author SHA1 Message Date
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
Paulo Motta b2037e473f
Allow overriding arbitrary settings via environment variables
This also allows overriding complex settings as a JSON value and adds documentation about these overrides to conf/jvm-server.options

patch by Paulo Motta; reviewed by Stefan Miklosovic, David Capwell for CASSANDRA-20749
2025-08-14 19:00:30 +02:00
Stefan Miklosovic 1e5c07af32
Merge branch 'cassandra-5.0' into trunk 2025-07-31 09:22:44 +02:00
Igor Kamyshnikov 7bf6eef9d4
Limit the number of held heap dumps to not consume disk space excessively
patch by Igor Kamyshnikov; reviewed by Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-20457
2025-06-30 11:34:23 +02:00
jaydeepkumar1984 58d1cc9b1e Increasing default for auto_repair.sstable_upper_threshold considering large Cassandra tables 2025-04-29 09:36:19 -05:00
Nikolay Izhikov fc97fd1037
Upgrade logback version to 1.5.18 and slf4j dependencies to 2.0.17
patch by Nikolay Izhikov; reviewed by Stefan Miklosovic, Maxim Muzafarov, Brandon Williams for CASSANDRA-20429
2025-04-25 14:24:35 +02: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
Stefan Miklosovic 2e356413ee
Merge branch 'cassandra-5.0' into trunk 2025-03-31 14:35:00 +02:00
Stefan Miklosovic d954c19b21
CASSANDRA-20296 follow-up: by default, explicitly set -XX:MaxDirectMemorySize to half of -Xmx
patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-20296
2025-03-31 12:55:32 +02: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
mck 346e096529
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Heap and GC jvm flags improvements
2025-02-22 11:06:00 +01:00
mck 0034a133fa
Heap and GC jvm flags improvements
G1 can rely on `-XX:G1NewSizePercent=50` to always floor the young generation's size to 50% of the heap. (In production this can be raised to 66% for optimal performance.)

Fixing the young generation size with `-Xmn` is only applicable to CMS, so move it to the appropriate section.

When using G1, we can automatically set `-XX:ParallelGCThreads` and `-XX:ConcGCThreads` to the number of system cpu cores.

The auto-generated heap size is now half the server's physical RAM, capped at 16G for CMS and 31G for G1.

Increase MaxTenuringThreshold from 1 to 2, as evidence has shown it has no cost (over values of zero or one), but can have significant benefits in keeping objects in the young generation. While, values above 2 don't have any noticeable benefit.

Always set CASSANDRA_HEAPDUMP_DIR, default it to $CASSANDRA_LOG_DIR, to avoid hprof filling up unexpected disk volumes. Assumption here is that the logs directory is large enough to handle these dumps, and/or operators are monitoring these directories more than other randon/unknown directories.

 patch by Mick Semb Wever; reviewed by Jon Haddad for CASSANDRA-20296
2025-02-22 10:59:42 +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
Stefan Miklosovic 2c684a0f5a
Merge branch 'cassandra-5.0' into trunk 2024-09-15 20:06:49 +02:00
Stefan Miklosovic 78ab095c87
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-09-15 20:05:52 +02:00
Stefan Miklosovic 48eab9afd8
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-09-15 19:57:53 +02:00
maxwellguo 9f18aab1dc
Fix millisecond and microsecond precision for commit log replay
patch by Maxwell Guo; reviewed by Brandon Williams, Stefan Miklosovic for CASSANDRA-19448
2024-09-13 15:42:20 +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 f79bb7b630
Merge branch 'cassandra-5.0' into trunk 2024-07-23 16:50:51 +02:00
Stefan Miklosovic c3bd83cd5c
Add java.base/java.lang.reflect among opens for jvm11-client.options
not adding this open triggered warnings in tools like auditlogviewer when on Java 11

patch by Stefan Miklosovic; reviewed by Brad Schoening for CASSANDRA-19780
2024-07-23 16:47:37 +02: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
Brandon Williams a09ab6313c Merge branch 'cassandra-5.0' into trunk 2024-06-11 13:11:11 -05:00