Commit Graph

1308 Commits

Author SHA1 Message Date
Paulo Motta 9500eb129b Backport Automated Repair Inside Cassandra (CEP-37)
Includes bug fixes and features:
- Improved observability in AutoRepair (CASSANDRA-20581)
- Stop repair scheduler if two major versions detected (CASSANDRA-20048)
- Safeguard Full repair against disk protection (CASSANDRA-20045)
- Stop AutoRepair monitoring thread upon shutdown (CASSANDRA-20623)
- Fix race condition in auto-repair scheduler (CASSANDRA-20265)
- Minimum repair task duration setting (CASSANDRA-20160)
- Preview_repaired auto-repair type (CASSANDRA-20046)
- Gate auto-repair behind cassandra.autorepair.enable JVM property
- Add cassandra.autorepair.check_min_version to gate minimum version enforcement
- Prevent auto-repair from running if any node is below 5.0.7
- Make system_distributed auto-repair schema conditional on feature being enabled
- Add user-friendly errors for disabled auto-repair and schema incompatibility

patch by Paulo Motta; reviewed by Andy Tolbert, Jaydeepkumar Chovatia for CASSANDRA-21138

Co-Authored-By: Andy Tolbert <andy_tolbert@apple.com>
Co-Authored-By: Chris Lohfink <clohfink@netflix.com>
Co-Authored-By: Francisco Guerrero <frankgh@apache.org>
Co-Authored-By: Himanshu Jindal <himanshj@amazon.com>
Co-Authored-By: Jaydeepkumar Chovatia <jchovati@uber.com>
Co-Authored-By: Kristijonas Zalys <kzalys@uber.com>
Co-Authored-By: jaydeepkumar1984 <chovatia.jaydeep@gmail.com>
2026-04-08 10:53:41 -04:00
mck be0b73ecba
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add option to disable cqlsh history
2026-03-17 23:08:14 +01:00
mck ec39ef3193
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Add option to disable cqlsh history
2026-03-17 23:06:38 +01:00
Ekaterina Dimitrova b47179b7d4
Add option to disable cqlsh history
We can disable saving of the history either via command-line parameter --disable-history, or by setting disabled = True in the history section of the cqlshrc. Both options will read existing history, and just won't save new commands.

Update help and docs for cqlsh history.
Add startup info logline whenr history logging is enabled.
Add a fix for cqlshrc file path not correctly expanding.

Includes the Backport of
  Allows users to change cqlsh history location using env variable
  patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-17448

patch by Ekaterina Dimitrova; reviewed by Mick Semb Wever for CASSANDRA-XXX

Co-authored-by: Alex Ott alex.ott@datastax.com
Co-authored-by: Jaroslaw Grabowski jaroslaw.grabowski@datastax.com
2026-03-17 23:01:57 +01:00
MichaelMorris 8b6195a975
Upgrade logback version to 1.5.18 and slf4j dependencies to 2.0.17
Dropback of CASSANDRA-20429 to cassandra-5.0

patch by Michael Morris; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-21137
2026-02-06 13:28:03 +11: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 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
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
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
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 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
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 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
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 10a98fe5aa
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-07-15 15:40:22 +02:00
Brandon Williams 531de93369 Disable chronicle analytics
Patch by brandonwilliams; reviewed by smiklosovic for CASSANDRA-19656
2024-06-11 13:10:12 -05:00
Stefan Miklosovic 59a5c6477d
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-05-14 11:31:40 +02:00
Мещеряков Вячеслав Юрьевич d1f2936ccb
Support legacy plain_text_auth section in credentials file removed unintentionally
patch by Мещеряков Вячеслав Юрьевич; reviewed by Stefan Miklosovic and Brad Schoening for CASSANDRA-19498
2024-05-14 10:07:19 +02:00
Brandon Williams 3b8c48024e Merge branch 'cassandra-4.1' into cassandra-5.0 2024-05-08 10:28:46 -05:00
Brandon Williams c6017aca77 Merge branch 'cassandra-4.0' into cassandra-4.1 2024-05-08 10:28:12 -05:00
Raymond Huffman 057d082e00 Add option to override the FatClient timeout for Bootstrapping nodes
Patch by Raymond Huffman; reviewed by brandonwilliams and dcapwell for
CASSANDRA-15439
2024-05-07 16:32:41 -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
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
Stefan Miklosovic 2f836fa596
Set uuid_sstable_identifiers_enabled to true for cassandra-latest.yaml
patch by Stefan Miklosovic; reviewed by Branimir Lambov, Jacek Lewandowski for CASSANDRA-19460
2024-03-12 13:33:08 +01:00
Branimir Lambov 06ed1afc34 Add an optimized default configuration to tests and make it available for new users
This patch adds a new configuration file, cassandra_latest.yaml, which changes
some of the settings to use new features we usually recommend to users,
including:
- Big Trie-Indexed SSTables
- Trie memtables
- Unified Compaction Strategy
- Storage Attached Index
- Off-heap objects memtables
- Direct-write commit log
- No storage compatibility

These changes are applied in new test targets for unit, in-jvm and python dtests that are
run pre-commit. When changes are made to the new config file, python dtest will use it
directly, but unit and in-jvm dtests require updates, respectively, to latest_diff.yaml
and InstanceConfig.java.

patch by Branimir Lambov; reviewed by Berenguer Blasi for CASSANDRA-18753
2024-03-07 11:08:44 +02:00
Brandon Williams 194a41baea Add export for remote JMX security for j17
Patch by brandonwilliams; reviewed by smiklosovic for CASSANDRA-19453
2024-03-04 14:16:59 -06:00
Stefan Miklosovic 5ae1294cb1
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-02-21 09:15:00 +01:00
Stefan Miklosovic 6250ba7929
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-02-21 09:08:53 +01:00
Stefan Miklosovic 98d0e181d5
Remove bashisms for mx4j tool in cassandra-env.sh
/bin/sh (our shebang in bin/cassandra) does not recognize the
`if` construct which is available in /bin/bash only hence if
MX4J_ADDRESS or MX4J_PORT was not commented out, the script would
fail to execute it.

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-19416
2024-02-21 08:37:23 +01:00
Stefan Miklosovic 8b037a6c84
Deprecate native_transport_port_ssl
patch by Stefan Miklosovic; reviewed by Abe Ratnofsky, Brandon Williams for CASSANDRA-19392
2024-02-14 15:49:01 +01:00
Andrés de la Peña 5b9321eee1 Merge branch 'cassandra-4.1' into cassandra-5.0 2024-02-08 11:33:23 +00:00
Andrés de la Peña 89a8155916 Merge branch 'cassandra-4.0' into cassandra-4.1 2024-02-08 11:11:07 +00:00
Andrés de la Peña 505f5af645 Ensure that repair doesn't exceed repair_session_space by running limiting validation parallelism
patch by Andrés de la Peña; reviewed by David Capwell for CASSANDRA-19336

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
2024-02-08 11:09:21 +00:00
Ekaterina Dimitrova 9f5e45e5a2 Append additional JVM options when using JDK17+
patch by Ekaterina Dimitrova; reviewed by Paulo Motta for CASSANDRA-19001
2024-01-19 18:50:53 -05:00
Stefan Miklosovic 8ce4a6d1ec
Optionally fail when a non-partition-restricted query is issued against an index
patch by Stefan Miklosovic; reviewed by Caleb Rackliffe for CASSANDRA-18796
2024-01-02 10:31:34 +01:00
Jacek Lewandowski 2fc2be54ca Fix the correspondingMessagingVersion of SSTable format and improve TTL overflow tests coverage
Patch by Jacek Lewandowski; reviewed by Berenguer Blasi for CASSANDRA-19197
2023-12-15 09:40:37 +01:00
Amit Pawar 3259bea533 Enable Direct-IO feature for CommitLog files using Java native API's.
Patch by Amit Pawar and Jacek Lewandowski; reviewed by Branimir Lambov and Maxwell Guo for CASSANDRA-18464

Co-authored-by: Amit Pawar <Amit.Pawar@amd.com>
Co-authored-by: Jacek Lewandowski <lewandowski.jacek@gmail.com>
2023-11-29 11:29:23 +01:00
Stefan Miklosovic e1355d7238
Set default disk_access_mode to mmap_index_only
patch by Stefan Miklosovic; reviewed by Paulo Motta, Caleb Rackliffe, Brandon Williams for CASSANDRA-19021
2023-11-15 22:14:21 +01:00
Bereng 0e4c2f4bef Default to nb instead of nc for sstable formats
patch by Berenguer Blasi; reviewed by Francisco Guerrero, Jacek Lewandowski, Michael Semb Wever for CASSANDRA-19010
2023-11-13 09:26:11 +01:00
David Capwell 164fa7949d Add support for repair coordinator to retry messages that timeout
patch by David Capwell; reviewed by Caleb Rackliffe, Marcus Eriksson for CASSANDRA-18816
2023-09-27 16:21:36 -07:00
Ekaterina Dimitrova 2b23fc58aa Fix accessing java.nio.Bits.TOTAL_CAPACITY in Java17
patch by Ekaterina Dimitrova; reviewed by Stefan Miklosovoc and Mick Semb Wever for CASSANDRA-18848
2023-09-14 12:00:11 -04:00
Maxim Muzafarov 6708499e4c Remove metrics-reporter-config dependency
patch by Maxim Muzafarov; reviewed by Ekaterina Dimitrova and Brandon Williams for CASSANDRA-18743
2023-09-12 10:14:59 -04:00
Mick Semb Wever 865954fd99
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Missing license info and headers
2023-08-31 22:43:33 +02:00