Commit Graph

15076 Commits

Author SHA1 Message Date
Doug Rohrer c988b609b0 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  CASSANDRA-20884 - Move JMX classes to the in-jvm-dtest API project
2025-10-24 14:23:42 -04:00
Doug Rohrer aa0e2f1631 CASSANDRA-20884 - Move JMX classes to the in-jvm-dtest API project
patch by Doug Rohrer; reviewed by Francisco Guerrero and Bernardo Botella Corbi for CASSANDRA-20884
2025-10-24 13:37:08 -04: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
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
Stefan Miklosovic 4a1c4052af
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-25 17:26:09 +02:00
Stefan Miklosovic aeae910d08
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-25 17:24:10 +02:00
Stefan Miklosovic a64a64b915
Update commons-lang3 to 3.18.0
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20849
2025-08-25 17:21:19 +02: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
Andy Tolbert 12dcb130f7 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
2025-08-20 18:00:05 -05:00
Andy Tolbert 3199a958c3 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
2025-08-20 17:55:19 -05:00
Andy Tolbert c9f8d276c2 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
2025-08-20 17:51:48 -05:00
Andy Tolbert 411187f129 Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
Adds setNativeTransportMaxConcurrentConnectionsPerIp and
getNativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean so
these methods can be used from JMX like the
*NativeTransportMaxConcurrentConnections methods.

patch by Andy Tolbert; reviewed by Chris Lohfink for CASSANDRA-20642
2025-08-20 17:46:15 -05:00
Stefan Miklosovic b7e2b3b9dc
Merge branch 'cassandra-5.0' into trunk 2025-08-20 10:55:52 +02:00
Stefan Miklosovic 74e0794d92
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-20 10:53:22 +02:00
Stefan Miklosovic 4824ecc4a5
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-20 10:50:20 +02:00
Stefan Miklosovic eb9586dc68
Make secondary index implementations notified about rows in fully expired SSTables in compaction
patch by Stefan Miklosovic; reviewed by Branimir Lambov for CASSANDRA-20829
2025-08-20 10:42:01 +02:00
David Capwell acec78abf4 BEGIN TRANSACTION crashes if a mutation touches multiple rows
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20844
2025-08-19 18:07:12 -07:00
Dmitry Konstantinov 657d9578f0 Fix version range check in MessagingService.getVersionOrdinal
ninja: remove unused imports in CommandsForRanges to pass checkstyle

Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic, Caleb Rackliffe for CASSANDRA-20842
2025-08-19 18:25:06 +01:00
Stefan Miklosovic 9d5cef7f8c
Allow custom constraints to be loaded via SPI
patch by Stefan Miklosovic; reviewed by Bernardo Botella, Saranya Krishnakumar for CASSANDRA-20824
2025-08-18 10:05:38 +02:00
Dmitry Konstantinov 7fb21c323a Optimize DataPlacement lookup by ReplicationParams
Avoid double lookup of the same DataPlacement in forNonLocalStrategyTokenRead and forNonLocalStrategyTokenWrite methods
Memorize hashCode value for ReplicationParams
Deduplicate ReplicationParams to use the same objects in DataPlacements and KeyspaceMetadata to use the fast == path in the equals
Do not search endpoints for a token in a typical write case twice (to identify pending endpoints)

Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic, Sam Tunnicliffe for CASSANDRA-20804
2025-08-16 16:15:11 +01:00
Maxim Muzafarov ca1dca902c
Fix ShortPaxosSimulationTest and AccordSimulationRunner do not execute from the cli
patch by Maxim Muzafarov; reviewed by Ariel Weisberg for CASSANDRA-20805
2025-08-15 10:46:47 +02: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
Dmitry Konstantinov 7546d9e895 Optimize MessagingService.getVersionOrdinal
The map lookup (with an implicit auto-boxing) can be replaced with a plain arithmetic operation.
A unit test is used to ensure that the assumption about serialization version incrementing for new versions is still correct.
greaterThanOrEqual method is removed as unused.

Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20816
2025-08-08 14:20:13 +01:00
Dmitry Konstantinov 19118a6cff Optimize TrieMemtable#getFlushSet
A flushing range is a combination of partial and full shards, for full shards we use write time captured values for count and total size of partition keys, for partial shards we iterate over keys
When we iterate over partial shards we count key bytes only instead of reading them and also try to skip tokens full parsing

Patch by Dmitry Konstantinov; reviewed by Branimir Lambov for CASSANDRA-20760
2025-08-08 13:34:34 +01:00
Stefan Miklosovic bb7e706213
Merge branch 'cassandra-5.0' into trunk 2025-08-06 18:37:11 +02:00
Romain Hardouin 3b9669b116
Sort SSTable TOC entries for determinism
patch by Romain Hardouin; reviewed by Stefan Miklosovic, Dmitry Konstantinov for CASSANDRA-20494

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-08-06 18:34:26 +02:00
Stefan Miklosovic 974fc904aa
bump version 2025-08-05 14:33:59 +02:00
Caleb Rackliffe eb65c0e600 Support manual secondary index selection at the CQL level
patch by Caleb Rackliffe; reviewed by Andres de la Peña for CASSANDRA-18112

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Andres de la Peña <a.penya.garcia@gmail.com>
2025-08-01 14:42:27 -05:00
Stefan Miklosovic 82e1c3d1c0
Merge branch 'cassandra-5.0' into trunk 2025-07-31 11:16:37 +02:00
Stefan Miklosovic 345df4e723
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-31 11:15:15 +02:00
Dmitry Konstantinov b4210acd3d
Improve CommitLogSegmentReader to skip SyncBlocks correctly in case of CRC errors
patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20664
2025-07-31 11:09:11 +02:00
Stefan Miklosovic 1e5c07af32
Merge branch 'cassandra-5.0' into trunk 2025-07-31 09:22:44 +02:00
Stefan Miklosovic 96a6a7bc12
Do not source cassandra-env.sh unnecessarily in nodetool and other tooling
Sourcing cassandra-env.sh in bin/nodetool just to pick JMX_PORT from there
has undesirable side-effect of not being able to run nodetool when
MAX_HEAP_SIZE in cassandra-env.sh is uncommented.

patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov, Michael Semb Wever for CASSANDRA-20745
2025-07-31 09:15:37 +02:00
David Capwell 6adac494aa When regulars CQL mutations run on Accord use the txn timestamp rather than server timestamp
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20744
2025-07-30 13:19:41 -07:00
Stefan Miklosovic 5aeaef5f77
Merge branch 'cassandra-5.0' into trunk 2025-07-30 17:23:14 +02:00
Stefan Miklosovic cf83f8b2a4
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-30 17:21:45 +02:00
Isaac Reath fcaa1b3e39
Do not crash on first boot with data_disk_usage_max_disk_size set when data directory is not created yet
patch by Isaac Reath; reviewed by Paulo Motta, Stefan Miklosovic for CASSANDRA-20787
2025-07-30 17:19:10 +02:00
Stefan Miklosovic c675bb1c37
Merge branch 'cassandra-5.0' into trunk 2025-07-30 16:44:29 +02:00
Stefan Miklosovic 18aa3445b3
Make source distribution buildable by ant artifacts as doc/scripts/process-native-protocol-specs-in-docker.sh was not executable
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-20802
2025-07-30 16:42:01 +02:00
David Capwell 8c9627076b When using BEGIN TRANSACTION if a complex mutation exists in the same statement as one that uses a reference, then the complex delete is dropped
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20788
2025-07-29 14:18:36 -07:00
Paulo Motta 07163cfb51
Fix StorageService JMX mbean not available during bootstrap
Patch by Paulo Motta; reviewed by Stefan Miklosovic for CASSANDRA-19902
2025-07-28 09:28:02 +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
David Capwell e48d0dcd2c Journal.TopologyUpdate should not store the local topology as it can be inferred from the global on
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20785
2025-07-24 18:51:24 -07:00
Stefan Miklosovic e8e312b4d1
Merge branch 'cassandra-5.0' into trunk 2025-07-24 10:27:58 +02:00
Stefan Miklosovic 922819dc08
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-24 10:25:54 +02:00
Stefan Miklosovic f5f71b7fae
Rework / simplification of nodetool get/setguardrailsconfig commands
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-20778
2025-07-24 10:22:55 +02:00
David Capwell 8014eec7aa Merge branch 'cassandra-5.0' into trunk 2025-07-18 16:06:36 -07:00
David Capwell 169c37b030 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-18 16:04:46 -07:00
Yuqi Yan 4962f3da3f IntrusiveStack.accumulate is not accumulating correctly
patch by Yuqi Yan; reviewed by Benedict Elliott Smith, David Capwell for CASSANDRA-20670
2025-07-18 16:02:17 -07:00
Stefan Miklosovic 418e3a4899
Merge branch 'cassandra-5.0' into trunk 2025-07-18 07:52:31 +02:00
Stefan Miklosovic 5fb3ae4473
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-18 07:41:32 +02:00
Yuqi Yan 5c94bc8820
Add nodetool get/setguardrailsconfig commands
patch by Yuqi Yan; reviewed by Brandon Williams, Maxwell Guo, Stefan Miklosovic for CASSANDRA-19552

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-07-18 07:25:17 +02:00
David Capwell 8289bb4cde Accord: Topology serializer has a lot of repeated data, can dedup to shrink the cost
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20715
2025-07-10 20:06:02 -07:00
Marcus Eriksson f6c1002e44 Stream individual files in their own transactions and hand over ownership to a parent transaction on completion
patch by Marcus Eriksson; reviewed by Caleb Rackliffe and Jon Meredith for CASSANDRA-20728
2025-07-10 12:57:51 -05:00
Caleb Rackliffe 7b140f6a01 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  SSTableIndexWriter#abort() should log more quietly in cases where an exception is not provided
2025-07-09 13:49:02 -05:00
Caleb Rackliffe f9d759dc38 SSTableIndexWriter#abort() should log more quietly in cases where an exception is not provided
patch by Caleb Rackliffe; reviewed by Jon Meredith for CASSANDRA-20695
2025-07-09 13:41:40 -05: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
Caleb Rackliffe 1c2307bd62 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid availability gap between UP and queryability marking for already built SAI indexes on bounce
2025-06-27 11:38:25 -05:00
Caleb Rackliffe f553acea3e Avoid availability gap between UP and queryability marking for already built SAI indexes on bounce
patch by Caleb Rackliffe; reviewed by David Capwell and Dmitry Konstantinov for CASSANDRA-20732
2025-06-27 11:30:13 -05:00
David Capwell 8d641e06fc Accord: BEGIN TRANSACTIONs IF condition logic does not properly support meaningless emptiness and null values
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20667
2025-06-24 21:48:31 -07:00
Maxwell Guo 9a3fda57cd Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Make Commitlog flush data safely in Direct IO mode
2025-06-17 23:33:23 +08:00
Maxwell Guo 8de4c9250e Make Commitlog flush data safely in Direct IO mode
patch by Maxwell Guo; reviewed by Ariel Weisberg for CASSANDRA-20692
2025-06-17 23:24:06 +08:00
Caleb Rackliffe 0a3e624a28 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Get SAI MemtableIndex refs before SSTableIndex refs at query time
2025-06-16 16:06:41 -05:00
Michael Marshall a72dcbc86a Get SAI MemtableIndex refs before SSTableIndex refs at query time
SAI predicate search currently has a bug that could result in missing rows due to a
concurrent flush during a query. The new test created in this PR shows the point of failure.
The problem is that we get the SSTable index references before getting the Memtable index
references. Note that we do it in the correct order in the ANN OF query path, but not
in the WHERE query path.

This commit updates the QueryView object to hold references to the appropriate Memtable indexes.

It also removes the problematic search methods from MemtableIndexManager to prevent future misuse.

patch by Michael Marshall; reviewed by Caleb Rackliffe and Ekaterina Dimitrova for CASSANDRA-20709
2025-06-16 16:00:47 -05:00
David Capwell 4d141e4b0a Accord: startup race condition where accord journal tries to access the 2i index before its ready
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-20686
2025-06-10 14:36:06 -07:00
Ariel Weisberg 83f58b4e1b Merge branch 'cassandra-5.0' into trunk 2025-06-10 16:33:34 -04:00
samlightfoot 53ccfd58f2 Fix MAX_SEGMENT_SIZE < chunkSize in MmappedRegions::updateState
patch by samlightfoot, Szymon Mi<C4><99><C5><BC>a<C5><82>; reviewed by Ariel Weisberg, Michael Semb Wever for CASSANDRA-20636
2025-06-10 16:32:11 -04:00
samlightfoot 58ee847968 Adopt Unsafe::invokeCleaner for Direct ByteBuffer cleaning
Patch by Samuel D Lightfoot; Reviewed by Ariel Weisberg and Abe Ratnosfky for CASSANDRA-20677
2025-06-09 14:14:40 -04:00
maoling 1261ba159c
Add additional metrics around hints
patch by Ling Mao; reviewed by Stefan Miklosovic, Maxim Muzafarov for CASSANDRA-20499

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-06-05 10:55:33 +02:00
Stefan Miklosovic 3a506eb104
Merge branch 'cassandra-5.0' into trunk 2025-06-02 12:31:31 +02:00
Dmitry Konstantinov 3969de6524
Mark JDK 17 as production ready
patch by Dmitry Konstantinov; reviewed by Michael Semb Wever, Stefan Miklosovic for CASSANDRA-20681
2025-06-02 12:15:59 +02:00
Ariel Weisberg 5450a1f20e Support for add and replace in IntervalTree
Patch by Ariel Weisberg and Yuqi Yan; Reviewed by Marcus Eriksson for CASSANDRA-20513

Co-authored-by: Yuqi Yan <yukei0509@gmail.com>
2025-05-29 17:10:55 -04:00
Sam Tunnicliffe 8d89e160fd Ninja fix CHANGES.txt 2025-05-29 10:25:25 +01:00
Caleb Rackliffe fe13726fc6 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure replica filtering protection does not trigger unnecessary short read protection reads
2025-05-28 16:53:06 -05:00
Caleb Rackliffe e5c101673a Ensure replica filtering protection does not trigger unnecessary short read protection reads
patch by Caleb Rackliffe; reviewed by Blake Eggleston and Zhao Yang for CASSANDRA-20639
2025-05-28 16:40:37 -05:00
Andy Tolbert 34650af75a Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:35:02 -05:00
Andy Tolbert e90fece187 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:29:40 -05:00
Andy Tolbert 9c308ce2f3 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:22:41 -05:00
Andy Tolbert d077f69553 Ensure prepared_statement INSERT timestamp precedes eviction DELETE
Updates SystemKeyspace.writePreparedStatement to accept a timestamp
associated with the Prepared creation time. Using this timestamp
will ensure that an INSERT into system.prepared_statements will
always precede the timestamp for the same Prepared in
SystemKeyspace.removePreparedStatement.

This is needed because Caffeine 2.9.2 may evict an entry as soon
as it is inserted if the maximum weight of the cache is exceeded
causing the DELETE to be executed before the INSERT.

Additionally, any clusters currently experiencing a leaky
system.prepared_statements table from this bug may struggle to
bounce into a version with this fix as
SystemKeyspace.loadPreparedPreparedStatements currently does
not paginate the query to system.prepared_statements, causing heap
OOMs.  To fix this this patch adds pagination at 5000 rows and
aborts loading once the cache size is loaded. This should allow
nodes to come up and delete older prepared statements that may no
longer be used as the cache fills up (which should happen immediately).

This patch does not address the issue of Caffeine immediately evicting
a prepared statement, however it will prevent the
system.prepared_statements table from growing unbounded.  For most users
this should be adequate, as the cache should only be filled when there
are erroneously many unique prepared statements. In such a case we can
expect that clients will constantly prepare statements regardless
of whether or not the cache is evicting statements.

patch by Andy Tolbert; reviewed by Berenguer Blasi and Caleb Rackliffe for CASSANDRA-19703
2025-05-27 22:17:15 -05:00
David Capwell cfb393398f Merge branch 'cassandra-5.0' into trunk 2025-05-27 15:24:08 -07:00
Pranav Shenoy 823f48663e Unified Compaction does not properly validate min and target sizes
patch by Pranav Shenoy; reviewed by Branimir Lambov, Claude Warren, David Capwell for CASSANDRA-20398
2025-05-27 15:22:32 -07:00
Caleb Rackliffe 9c489b81a9 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid lambda usage in TrieMemoryIndex range queries and ensure queue size tracking is per column
2025-05-27 15:53:30 -05:00
Caleb Rackliffe dd0d8c03b9 Avoid lambda usage in TrieMemoryIndex range queries and ensure queue size tracking is per column
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20668
2025-05-27 15:44:01 -05:00
Stefan Miklosovic 4154632d16
Merge branch 'cassandra-5.0' into trunk 2025-05-23 17:50:44 +02:00
Brad Schoening 49c8122d8f
Avoid CQLSH throwing an exception loading .cqlshrc on non-supported platforms
While we do not support Windows as such (at least on server), reviewers evaluated that this might be fixed
as the gains (Windows users using CQLSH to connect to Cassandra running on supported platforms) are justified.

patch by Brad Schoening; reviewed by Brandon Williams, Josh McKenzie for CASSANDRA-20478
2025-05-23 17:49:28 +02:00
David Capwell a739e795de Merge branch 'cassandra-5.0' into trunk 2025-05-22 14:17:18 -07:00
David Capwell ac05c94e6a Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-22 14:15:37 -07:00
David Capwell 005d3c28e5 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-05-22 14:14:42 -07:00
David Capwell c736d22cf8 Gossip doesn't converge due to race condition when updating EndpointStates multiple fields
patch by David Capwell, Matt Byrd; reviewed by Blake Eggleston, Brandon Williams for CASSANDRA-20659
2025-05-22 14:12:15 -07:00
Dmitry Konstantinov 063e1fe3d2 Introduce NativeAccessor to avoid new ByteBuffer allocation on flush for each NativeCell
Patch by Dmitry Konstantinov; reviewed by Branimir Lambov for CASSANDRA-20173
2025-05-21 22:16:41 +01:00
Andy Tolbert f80a234d1e Migrate sstableloader code to its own tools directory and artifact
As part of a broader effort to decouple java driver code from the
server code, this moves sstableloader to its own tools directory.

As sstableloader is also used as a library (CASSANDRA-10637), added
a new artifact 'cassandra-sstableloader' that will get deployed to
maven along with 'cassandra-all'.

While I expect this is likely a niche use case, this will allow users
to continue using BulkExport as a library.

Moves sstableloader-specific targets to its own build.xml in
tools/sstableloader/build.xml.

Also updates IDE project files and circleci to utilize new
sstableloader-specific targets.

patch by Andy Tolbert; reviewed by Stefan Miklosovic and Mick Semb Wever for CASSANDRA-20328
2025-05-18 12:35:52 -05:00
jaydeepkumar1984 7ab1e3827c Stop AutoRepair monitoring thread upon Cassandra shutdown
patch by Jaydeepkumar Chovatia; reviewed by Bernardo Botella, Andrew Tolbert for CASSANDRA-20623
2025-05-16 14:47:57 -07:00
Dmitry Konstantinov 95716f6b4b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Relax validation of snapshot name as a part of SSTable files path validation
2025-05-16 13:12:43 +01:00
Dmitry Konstantinov 96b3db90fb Relax validation of snapshot name as a part of SSTable files path validation
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20649
2025-05-16 12:50:42 +01:00
Stefan Miklosovic 6cfea18dda
Avoid duplicate hardlink error upon forceful taking of ephemeral snapshots during repair
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-20490
2025-05-16 09:59:15 +02:00
Marcus Eriksson 629b02599e Merge branch 'cassandra-5.0' into trunk 2025-05-12 13:31:18 +02:00
Marcus Eriksson 29746cffbb Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-12 13:29:36 +02:00
Marcus Eriksson d4fb51347c Merge branch 'cassandra-4.0' into cassandra-4.1 2025-05-12 13:22:01 +02:00
Josh McKenzie f2e3a0a4fc Handle sstable metadata stats file getting a new mtime after compaction has finished
Patch by Josh McKenzie and marcuse; reviewed by Josh McKenzie and marcuse for CASSANDRA-18119
2025-05-12 13:16:50 +02:00
Brandon Williams a39f3b066f Merge branch 'cassandra-5.0' into trunk 2025-05-09 06:26:36 -05:00
Brandon Williams 9e1b09f384 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-09 06:22:50 -05:00
Brandon Williams b4484968bd Use MAX_PARALLEL_TRANSFERS instead of default
Patch by brandonwilliams, reviewed by mck for CASSANDRA-20532
2025-05-09 06:14:59 -05:00