Commit Graph

9441 Commits

Author SHA1 Message Date
Sam Tunnicliffe 38e0277503 Merge branch 'cassandra-6.0' into trunk 2026-06-17 12:33:24 +01:00
Alex Petrov 802ce7f8b2 Always send TCM commit failures as Messaging failures
Patch by Alex Petrov; reviewed by Sam Tunnicliffe for CASSANDRA-21457

Co-authored-by: Ariel Weisberg <aweisberg@apple.com>
2026-06-17 12:29:18 +01:00
David Capwell 017276263a Merge branch 'cassandra-6.0' into trunk 2026-06-16 10:48:17 -07:00
David Capwell 6c44f0561b Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-16 10:45:59 -07:00
David Capwell be797bd803 Merge branch 'cassandra-4.1' into cassandra-5.0 2026-06-16 10:44:24 -07:00
David Capwell 2949c8ed22 Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-16 10:40:43 -07:00
Alan Wang 41fd7c3e22 Consider first token of SSTable when calculating SSTable intersection in LeveledScanner
patch by Alan Wang; reviewed by David Capwell, Marcus Eriksson for CASSANDRA-21369
2026-06-16 10:38:19 -07:00
mck 308adc4f82
Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Implement splits for microbench test type
2026-06-14 16:50:50 +02:00
mck f1b6eafc76
Merge branch 'cassandra-5.0' into cassandra-6.0
* cassandra-5.0:
  Implement splits for microbench test type
2026-06-14 16:50:17 +02:00
Mick Semb Wever a1352e9be9
Implement splits for microbench test type
Also distinguish benches by jdk version and host arch.

 patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-21242
2026-06-14 16:49:13 +02:00
Benedict Elliott Smith c61bd06a01 Merge branch 'cassandra-6.0' into trunk 2026-06-09 10:14:59 +01:00
Benedict Elliott Smith 24717dbb0c ninja follow-up to CASSANDRA-21212: fix AccordVirtualTablesTest.tableUpdates 2026-06-09 10:14:47 +01:00
Marcus Eriksson 6fcd0cd094 Merge branch 'cassandra-6.0' into trunk 2026-06-09 08:34:50 +02:00
Marcus Eriksson 8fa9a75fc2 Don’t leave autocompaction disabled during bootstrap and replace
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-21236
2026-06-09 08:31:51 +02:00
Marcus Eriksson ea495907e1 Make nodetool abortbootstrap more robust
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-21235
2026-06-09 08:30:12 +02:00
Marcus Eriksson 740879d5a0 Don't clear prepared statement cache on nodetool cms initialize
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-21234
2026-06-09 08:29:02 +02:00
Marcus Eriksson 9af2b2cdf8 Improve performance deserializing cluster metadata
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-21224
2026-06-09 08:26:28 +02:00
Marcus Eriksson af5eed2a32 Handle lost response when committing PrepareMove
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-21222
2026-06-09 08:22:45 +02:00
Benedict Elliott Smith 45eee68f55 Merge branch 'cassandra-6.0' into trunk 2026-06-08 14:30:50 +01:00
Alan Wang be4ddab9dd Safely regain ranges and delete retired command stores
patch by Alan Wang; reviewed by Benedict for CASSANDRA-21212
2026-06-08 14:28:46 +01:00
Dmitry Konstantinov 1705c1b64c Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Reduce memory allocations in miscellaneous places along read path
2026-06-05 12:48:54 +01:00
Dmitry Konstantinov 64e041788a Reduce memory allocations in miscellaneous places along read path
org.apache.cassandra.db.rows.RangeTombstoneMarker.Merger is allocated on demand
Optional usage in org.apache.cassandra.db.rows.UnfilteredRowIteratorWithLowerBound is replaced with a boolean field
Double in org.apache.cassandra.io.util.CompressedChunkReader#getCrcCheckChance - specialized supplier is used to avoid boxing
Stack - adjust default from 5 to 6 to avoid extra resizings in org.apache.cassandra.db.transform.Stack#resize
EnumSet for CL guardrail in SelectStatement - add a condition to allocate it only if the guardrail is enabled
EnumSet in ResultMetadata - replace it with plain int flags

patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21360
2026-06-05 12:34:35 +01:00
Dmitry Konstantinov 061749b0ae Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Avoid ByteBuffer wrapping in cql3.selection.Selector.InputRow to reduce memory allocation rate
2026-06-04 19:28:55 +01: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
Stefan Miklosovic ac19ddc68d
Merge branch 'cassandra-6.0' into trunk 2026-06-04 11:13:57 +02:00
Stefan Miklosovic 62a3797ce3
Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-04 10:41:44 +02:00
Stefan Miklosovic 2a219ed873
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-06-04 10:37:40 +02:00
Stefan Miklosovic eacc60fa37
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-04 10:22:23 +02:00
Stefan Miklosovic 1362ac6f69
Validate snapshot names
The validation of snapshot names is turned off by default.
It is controlled by system property cassandra.snapshot.validation which is by default
set to false except 7.0 branch.

When the validation is turned on, the allowed characters are AWS safe characters together
with "+" character. A user can not specify any path separators in snapshot names even if
the validation as such is turned off.

patch by Stefan Miklosovic; reviewed by Francisco Guerrero, Matt Byrd for CASSANDRA-21389
2026-06-04 10:18:27 +02:00
Stefan Miklosovic 50960a2e7e
Remove 4.0 upgrade paths and related 4.0 tests
patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-21324
2026-06-02 23:54:38 +02:00
Dmitry Konstantinov e6642fe4c9 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Implement custom CassandraThread to keep direct references to frequently used thread local objects
2026-06-02 14:02:17 +01:00
Dmitry Konstantinov 72d53e3919 Implement custom CassandraThread to keep direct references to frequently used thread local objects
patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith, Stefan Miklosovic for CASSANDRA-21020
2026-06-02 13:56:59 +01:00
Benedict Elliott Smith d3923f822e Merge branch 'cassandra-6.0' into trunk 2026-06-02 13:48:39 +01:00
Benedict Elliott Smith e278f0cbbc Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-02 13:48:31 +01:00
Benedict Elliott Smith 1656a9cb01 Merge branch 'cassandra-4.1' into cassandra-5.0 2026-06-02 13:46:18 +01:00
Benedict Elliott Smith 37b85a35b4 Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-02 13:45:58 +01:00
abeckruiz 863cb651e7 BTree.FastBuilder.reset() fails to clear savedBuffer and savedNextKey, causing ClassCastException and SSTable header corruption during schema disagreement
patch by Andrés Beck-Ruiz, Runtian Liu; reviewed by Zhao Yang, Benedict Elliott Smith for CASSANDRA-21216

Co-authored-by: Runtian Liu <runtian@uber.com>
2026-06-02 10:14:26 +01:00
Stefan Miklosovic c59ae41217
Merge branch 'cassandra-6.0' into trunk 2026-05-31 11:27:44 +02:00
walcp1 bbff4f8d18
Add rowsMutatedPerWriteHistogram metric to track rows mutated per write request
patch by Piotrek Walczak; reviewed by Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-21320
2026-05-31 11:26:02 +02:00
Dmitry Konstantinov 9c3caa8c95 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  A test emitting both a failure and error element in the same JUnit XML testcase crashes CI summary generation
2026-05-30 16:54:57 +01:00
Dmitry Konstantinov ae447445b3 Merge branch 'cassandra-5.0' into cassandra-6.0
* cassandra-5.0:
  A test emitting both a failure and error element in the same JUnit XML testcase crashes CI summary generation
2026-05-30 16:45:06 +01:00
Dmitry Konstantinov ffe7f761b8 A test emitting both a failure and error element in the same JUnit XML testcase crashes CI summary generation
patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-21396
2026-05-30 16:23:50 +01:00
Stefan Miklosovic ad9db90a1f
Merge branch 'cassandra-6.0' into trunk 2026-05-29 16:21:26 +02:00
pwalczak 03450cdea6
Add TotalRowsRead and TotalRowsMutated counters to TableMetrics for accurate per-table row throughput tracking
patch by Piotrek Walczak; reviewed by Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-21321
2026-05-29 16:20:38 +02:00
Marcus Eriksson 04064783bf
fix cluster metadata upgrade tests - these only make sense when upgrading from a gossip cluster to a cluster metadata one
patch by Marcus Eriksson; reviewed by Francisco Guerrero for CASSANDRA-21326
2026-05-29 11:40:10 +02:00
Stefan Miklosovic 68133fe705
Merge branch 'cassandra-6.0' into trunk 2026-05-29 09:54:56 +02:00
Stefan Miklosovic e21461e4e8
Move exception handling of SPI startup checks when iterating over them
patch by Stefan Miklosovic; reviewed by Caleb Rackliffe for CASSANDRA-21409
2026-05-29 09:35:52 +02:00
Dmitry Konstantinov c588b674bf Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Avoid type lookup in SerializationHeader#getType if schema and SSTable are aligned
2026-05-28 15:20:11 +01:00
Dmitry Konstantinov 9198058986 Avoid type lookup in SerializationHeader#getType if schema and SSTable are aligned
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21402
2026-05-28 15:11:03 +01:00
David Capwell d8de51c654 Merge branch 'cassandra-6.0' into trunk 2026-05-27 15:23:20 -07:00
David Capwell bc6e4a2b63 Fix flaky test DropAccordTableTest
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-21397
2026-05-27 15:21:07 -07:00
Dmitry Konstantinov fbf1137c80 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  BTreeRow.hasLiveData: avoid Cell iteration if there are no cell tombstones
2026-05-26 15:48:24 +01:00
Dmitry Konstantinov bf711a0fc1 BTreeRow.hasLiveData: avoid Cell iteration if there are no cell tombstones
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21363
2026-05-26 15:33:28 +01:00
Dmitry Konstantinov e686ab81ca Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Reduce time to execute microbench-test
2026-05-21 20:52:31 +01:00
Dmitry Konstantinov 1f078c0daf Reduce time to execute microbench-test
Set 1 thread and 1 second for the measurement iteration (note: it is a smoke test only, we do not analyze results from such short measurements)
Exclude some options for heavy benchmarks by default
Shutdown all threads once JMH test is completed to avoid awaiting of a forked JVM till timeout at the end

patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-21388
2026-05-21 20:27:42 +01:00
Sam Tunnicliffe 43a1f51d45 Merge branch 'cassandra-6.0' into trunk 2026-05-20 16:29:24 +01:00
Matt Byrd 7927ac4395 Bring back the ability to Optionally avoid hint transfer during decommission (CASSANDRA-17808)
lost due to merge of ae0842372f

patch by Matt Byrd; reviewed by Stefan Miklosovic and Sam Tunnicliffe for CASSANDRA-21341
2026-05-20 16:20:53 +01:00
Benedict Elliott Smith 5eba832793 Merge branch 'cassandra-6.0' into trunk 2026-05-18 13:25:59 +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
Benedict Elliott Smith dc7935be80 Merge branch 'cassandra-6.0' into trunk 2026-05-16 21:15:27 +01:00
Benedict Elliott Smith a0dc6f857b Introduce AccordExecutorSignalLoop that aims to reduce lock contention:
- consumer and producer threads wait signal without acquiring the lock first
 - lock owners may prepare more work than they need, moving some dynamically-adjusted portion of the work from the prioritised lock-managed structures onto a non-blocking queue, so that other threads may consume work from there; the portion is continually micro-adjusted to target some available work whenever the lock is acquired.
 - adopts/supports some features of the SEPExecutor:
  - threads may auto-adjust the number of running threads based on how much time is collectively spent waiting, to minimise time spent signalling
  - consumers may (timed-sleep) poll rather than await a signal, reducing the number of kernel interactions needed; relying on the auto-adjustment to bound the time the scheduler spends waking threads with no work to do
Also Fix:
 - Client Result should not be persisted or included in Command object at any time

patch by Benedict; reviewed by Alex Petrov and Ariel Weisberg for CASSANDRA-21375
2026-05-16 21:12:49 +01:00
Sam Tunnicliffe 206485e820 Merge branch 'cassandra-6.0' into trunk 2026-05-15 14:49:01 +01:00
nvharikrishna c9d60a61e3 Offline tool for working with cluster metadata dump files
The following subcommands have been added:

* abortbootstrap        Cancel and undo an inflight bootstrap
* abortmove             Cancel and undo an inflight token move
* abortdecommission     Cancel and undo an inflight decommission
* assassinate           Remove a node from cluster metadata
* resetcms              Redefine the CMS membership
* move                  Modify a node's (single) owned token
* describe              Output a summary of the cluster metadata
* forcejoin             Force a registered or joining node into a JOINED state
* print                 Output a full rendering of cluster metadata
* printdirectory        Output a full rendering of the directory
* printdataplacements   Output the full data placements

Patch by Venkata Harikrishna Nukala; reviewed by Alex Petrov and Sam Tunnicliffe
for CASSANDRA-19151
2026-05-15 14:41:06 +01:00
Benedict Elliott Smith 5634d4e02a Merge branch 'cassandra-6.0' into trunk 2026-05-15 11:08:34 +01:00
Benedict Elliott Smith 4930ae0e6e CASSANDRA-21361 follow-up: recontact forbids self addressed messages and we ensure self-addressed messages send full information to avoid having multiple LocalDelivery contexts 2026-05-15 10:26:45 +01:00
Dmitry Konstantinov a918f6c2a4 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  ninjia: add an accidentally removed newline in test/conf/cassandra.yaml
2026-05-14 14:47:05 +01:00
Dmitry Konstantinov 687fbf282f ninjia: add an accidentally removed newline in test/conf/cassandra.yaml 2026-05-14 14:43:21 +01:00
Benedict Elliott Smith 890ba2a364 Merge branch 'cassandra-6.0' into trunk 2026-05-13 15:16:04 +01:00
Benedict Elliott Smith 41cf61402c Improve Tail Latency
- TransactionStatement token aware routing
 - Mitigate convoy effect:
   - ExecuteTxnBacklog v1 can execute single key transaction backlogs and disseminate the result
     - Direct local execution possible for single key transactions
   - Use shardAppliedBefore instead of gcBefore to cleanup CFK faster
Also Improve:
 - Introduce distributed tracing
 - Combine RejectBefore and MaxConflicts
 - Self-addressed messages are delivered directly
 - Disable AccordSyncPropagator by default, as incompatible with large clusters
 - FastPathStrategy.SIMPLE should not modify fast path contents; FastPathStrategy.UP introduced to adopt this behaviour
 - Configurable queue prioritisation
 - ProtocolModifiers mostly final
 - Remove unnecessary condition check when serializing TxnUpdate
Also Fix:
 - SequentialExecutor ownership bug
 - BTree.XUpdater.reset()

patch by Benedict; reviewed by Alex Petrov and Ariel Weisberg for CASSANDRA-21361
2026-05-13 15:15:23 +01:00
Benedict Elliott Smith 8ad8e56378 Artificial Latency Injection
patch by Benedict; reviewed by Alex Petrov and Ariel Weisberg for CASSANDRA-17024
2026-05-13 14:20:56 +01:00
Dmitry Konstantinov b6f175bfc2 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Uncompressed size is being used for compressed tables in maintenance operations
2026-05-13 13:33:39 +01:00
Dmitry Konstantinov 51a58ef22e Merge branch 'cassandra-5.0' into cassandra-6.0
* cassandra-5.0:
  Uncompressed size is being used for compressed tables in maintenance operations
2026-05-13 13:23:16 +01:00
Matt Byrd af6930c986 Uncompressed size is being used for compressed tables in maintenance operations
use compression ratio to scale the amount of remaining disk usage
CompactionInfo::estimatedRemainingWriteBytes is uncompressed, causing compaction to be rejected due to size when it has space to complete

patch by Matt Byrd; reviewed by Dmitry Konstantinov, Marcus Eriksson for CASSANDRA-21245

Co-authored-by: Jon Meredith <jmeredithco@apple.com>
2026-05-13 13:15:46 +01:00
Benedict Elliott Smith 3256650bb6 Merge branch 'cassandra-6.0' into trunk 2026-05-09 17:07:29 +01:00
Benedict Elliott Smith 8876ad4c03 Introduce:
- Clean Shutdown/Restart
 - Rebootstrap to allow nodes to rejoin consensus if they are out of sync, or did not shutdown cleanly
Improve:
 - Improve efficiency of BTreeReducingRangeMap
 - DurableBefore backed by BTreeReducingRangeMap
 - Soft reject new transactions when a replica has a backlog of work
 - system_accord_debug.command_store_ops supports starting journal replay
Fix:
 - Ensure SequentialExecutor.owner is unset only by the owner
 - Detect and avoid taking two AccordExecutor locks simultaneously
 - MaxConflicts serializer
 - tryToExecuteListening after replay, to handle invalidated dependencies
 - TxnNamedRead does not close a RowIterator, leading to native memory leaks
 - GetLatestDepsNack serialization
 - journal.readLast() did not read last
 - DefaultRemoteListeners not correctly synchronised
 - RangeTxnScanner cancellation assumes was already started
 - Start cfk compaction before replay
 - txn_graph should avoid visiting parents twice (possible if two different dependency chains connecting them in the graph)
 - Topology.cloneEquivalentWithEpoch should also share nodeLookup and ranges, especially to accelerate computeWaitForEpoch/computeScope
 - Do not invoke slowReplicaDelay or slowCoordinatorDelay during restore
 - Do not fail if slowReplicaDelay or slowCoordinatorDelay are invoked without knowing the transaction

patch by Benedict; reviewed by Alex Petrov and Ariel Weisberg for CASSANDRA-21355
2026-05-09 16:46:00 +01:00
JwahoonKim 1c718ab40f
Fix failing select on system_views.settings for non-string keys
patch by JwahoonKim; reviewed by Jyothsna Konisa, Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-21348
2026-05-05 10:34:33 +02:00
Dmitry Konstantinov aa61536928 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Avoid unit conversion in DatabaseDescriptor.getMaxValueSize() for every deserializing Cell
2026-04-30 23:40:48 +01:00
Dmitry Konstantinov 3e75652232 Avoid unit conversion in DatabaseDescriptor.getMaxValueSize() for every deserializing Cell
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21295
2026-04-30 23:32:02 +01:00
Scott Carey cbbd401244
Allow nodetool garbagecollect to take a user defined list of SSTables
patch by Scott Carey; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-16767
2026-04-30 13:53:45 +02:00
omniCoder77 eabd2a27f5
Add a guardrail for misprepared statements
patch by Rishabh Saraswat; reviewed by Stefan Miklosovic, Brad Schoening for CASSANDRA-21139
2026-04-30 13:31:03 +02:00
David Capwell cd75b9c6a1 Merge branch 'cassandra-6.0' into trunk 2026-04-29 11:41:25 -07:00
Alan Wang 8fd2443afc Fix single token batch atomicity with Accord/non-Accord batches by using the batch log
patch by Alan Wang; reviewed by Ariel Weisberg, David Capwell for CASSANDRA-20588
2026-04-29 11:37:10 -07:00
Caleb Rackliffe 7bd041d292 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Ensure SAI sends range tombstones to the coordinator for queries on static columns
2026-04-27 13:13:59 -05:00
Caleb Rackliffe 98f0a34f07 Merge branch 'cassandra-5.0' into cassandra-6.0
* cassandra-5.0:
  Ensure SAI sends range tombstones to the coordinator for queries on static columns
2026-04-27 13:06:48 -05:00
Caleb Rackliffe 8093c3c9ce Ensure SAI sends range tombstones to the coordinator for queries on static columns
patch by Caleb Rackliffe; reviewed by Andres de la Peña and David Capwell for CASSANDRA-21332
2026-04-27 13:01:00 -05:00
Stefan Miklosovic 42afa1bcbd
Merge branch 'cassandra-6.0' into trunk 2026-04-24 11:52:14 +02:00
Matt Byrd 456590d555
Ensure schema created before 2.1 without tableId in folder name can be loaded in SnapshotLoader
Best effort attempt to get tableId from CFS, fallback to null which
still allows snapshot to be loaded

End result is that nodetool clearsnapshot and listsnapshot function for such
snapshots on restart

In addition to 5.0 patch we move starting SnapshotManager to after TCM is initiliazed.
The consequence of such a move is that cleanup of ephemeral snapshots happens after startup checks pass.

patch by Matt Byrd; reviewed by Stefan Miklosovic, Brandon Williams and Francisco Guerrero for CASSANDRA-21246
2026-04-24 11:49:15 +02:00
Dmitry Konstantinov 1908b906f7 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Adjust QueriesTableTest to pass if SEP Threads renaming is disabled
2026-04-23 14:44:31 +01:00
Dmitry Konstantinov 37a60594f1 Adjust QueriesTableTest to pass if SEP Threads renaming is disabled
patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic, Caleb Rackliffe for CASSANDRA-21318
2026-04-23 14:32:44 +01:00
Stefan Miklosovic ccb2785b09
Merge branch 'cassandra-6.0' into trunk 2026-04-23 13:47:09 +02:00
Stefan Miklosovic b91b9c23ea
Merge branch 'cassandra-5.0' into cassandra-6.0 2026-04-23 13:44:54 +02:00
Stefan Miklosovic 2837bd7455
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-04-23 13:43:28 +02:00
Stefan Miklosovic 38245bb1e2
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-04-23 13:41:51 +02:00
Stefan Miklosovic 04febb75f1
Fix flaky CompactionTaskTest.testFullyExpiredSSTablesAreNotReleasedPrematurely
This fix was taken from e397aa06b1 (diff-3dbddb89a91055a1394ad89dcca2cd4506f01e40b7d73cb38fb0b0413fb0611a)

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-21329
2026-04-23 13:38:29 +02:00
Caleb Rackliffe fb4178f448 Merge branch 'cassandra-6.0' into trunk
* cassandra-6.0:
  Differentiate between legitimate cases where the first entry is the same as the last entry and empty bounds in SSTableCursorWriter#addIndexBlock()
2026-04-21 11:21:55 -05:00
Caleb Rackliffe 10ca003dd2 Differentiate between legitimate cases where the first entry is the same as the last entry and empty bounds in SSTableCursorWriter#addIndexBlock()
patch by Caleb Rackliffe; reviewed by Nitsan Wakart and Branimir Lambov for CASSANDRA-21255
2026-04-21 11:09:07 -05:00
Stefan Miklosovic f107986552
Merge branch 'cassandra-6.0' into trunk 2026-04-21 14:42:26 +02:00
Stefan Miklosovic bdeed77d17
Introduce minimum_threshold for data resurrection startup check
patch by Stefan Miklosovic; reviewed by Shailaja Koppu, Paulo Motta, Isaac Reath for CASSANDRA-21293
2026-04-21 14:39:57 +02:00
Stefan Miklosovic 82c6f8aa44
Merge branch 'cassandra-6.0' into trunk 2026-04-21 12:51:13 +02:00
Stefan Miklosovic e193523a06
Update 6.0 and 7.0 branches to reflect their versions across the project.
In 6.0, only rename test/data/serialization/5.1 to 6.0
In 7.0, same plus update edges in UpgradeTestBase

patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-21319
2026-04-21 12:46:11 +02:00
Sam Tunnicliffe 53f188293d Apply changes to gossip state for the local node synchronously, remote peers asynchronously
Patch by Sam Tunnicliffe; reviewed by Alex Petrov for CASSANDRA-21239

Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
2026-04-20 16:27:17 +01:00
Stefan Miklosovic 5e26f2527d
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-04-17 10:40:04 +02:00
Pedro Gordo 5aec56de3b
Backport CASSANDRA-17810 fix and improve RTBoundValidator error messages
patch by Pedro Gordo; reviewed by Josh McKenzie, Stefan Miklosovic for CASSANDRA-18282
2026-04-17 10:28:16 +02:00
Alan Wang 02352b78d5 Reject writes that modify the same (row, col) more than once in a transaction, to avoid ambiguous cell resolution behaviour
patch by Alan Wang; reviewed by Benedict for CASSANDRA-21136
2026-04-16 19:53:52 +01:00
Minal Kyada 4134d72a5a Reduce probability of intermittent failures in WriteWarningsSnapshotTest
Patch by Minal Kyada; reviewed by Sam Tunnicliffe and Caleb Rackliffe
for CASSANDRA-21263
2026-04-15 08:12:03 +01:00
Benedict Elliott Smith 6a665f3ee4 InMemoryRangeIndex
Also Add:
 - txn_graph and txn_graph_all virtual tables for debugging transaction dependency graphs
 - txn_cache virtual table to debug accord cache contents
Also Fix:
 - NPE in AccordDebugKeyspace.TxnOpsTable
 - AccordCoordinatorMetrics latency metrics should use Timer not Histogram
 - OnDiskIndex.readLast
Also Improve:
 - Catchup should run after progress log is started
 - Cancelling AccordTask should early-terminate range scanning
 - Improve RangeTxnScanner description
 - Add ballot to txn tables
 - Add NodeId to logging output

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-21306
2026-04-13 16:01:47 +01:00
Stefan Miklosovic e7fa71efaa
Implement a guardrail for client driver versions
patch by Stefan Miklosovic; reviewed by Andy Tolbert, Bohdan Siryk for CASSANDRA-21146
2026-04-13 10:37:05 +02:00
Joel Shepherd 281c1dc92c
Enable IAuthenticator to declare supported and alterable role options
With negotiated authentication (CEP-50), nodes may be configured with multiple authenticators. Prior to this change,
a number of areas in the code assumed that there was a single configured authenticator and contained logic that
switched depending on the authenticator type. This logic won't work when multiple authenticators can be configured.
This change eliminates most calls to DataDescriptor.getAuthenticator(), by enabling individual authenticators to
declare the role attributes they support, requiring callers to specify the type of authenticator they're looking
for, and directly returning whether the node can enforce authn or not rather than inferring it by the presence of
an authenticator.

Testing done: Unit tests for auth and config packages; d-tests for auth-related functionality (e.g. ColumnMasks).

patch by Joel Shepherd; reviewed by Stefan Miklosovic, Andy Tolbert for CASSANDRA-20834
2026-04-12 22:15:49 +02:00
Francisco Guerrero 536504969c Reuse a single TrackedDataInputPlus instance per UnfilteredSerializer
patch by Francisco Guerrero; reviewed Dmitry Konstantinov, Caleb Rackliffe for CASSANDRA-21296
2026-04-11 10:46:59 -07:00
Stefan Miklosovic ab80b9e7c8
Merge branch 'cassandra-5.0' into trunk 2026-04-10 10:46:13 +02:00
Stefan Miklosovic a03745abd8
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-04-10 10:35:46 +02:00
John Lu 20d19c6627
Harden data resurrection startup check with atomic heartbeat file write with fallback
patch by John Lu; reviewed by Abe Ratnofsky, Chris Lohfink, Stefan Miklosovic for CASSANDRA-21290
2026-04-10 10:14:49 +02:00
Minal Kyada c484fc511a Add tooling to repair system peers tables if inconsistent with cluster metadata
Patch by Minal Kyada; reviewed by Alex Petrov and Sam Tunnicliffe for
CASSANDRA-21187
2026-04-08 20:09:50 +01:00
Paulo Motta 73063437b6 Merge branch 'cassandra-5.0' into trunk 2026-04-08 11:17:44 -04:00
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 300c216aa6
ninja trunk patch for CASSANDRA-21202
this diff was supposed to be included in 5f9de8ca13

Rate limit password changes
Introduces property cassandra.role_password_update_interval_in_ms, with default value of 5000.
Logging added when passwords on roles are changed or are rate-limited.

 patch by Mick Semb Wever; reviewed by Doug Rohrer, Jeremiah Jordan for CASSANDRA-21202
2026-04-08 15:09:58 +02:00
Dmitry Konstantinov 1a9ab95c20 Fix a removed TTLed row re-appearance in a materialized view after a cursor compaction
Add an implementation of isExpired to ReusableLivenessInfo, before the change the method implementation was interited from an interface and always returned false, so livenessInfo().supersedes(...) did not work properly.

patch by Dmitry Konstantinov; reviewed by Branimir Lambov, Nitsan Wakart for CASSANDRA-21152
2026-04-01 18:58:02 +01:00
Sunil Ramchandra Pawar 157e8808f9 Add range delete support to AST-based fuzz tests
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-20949
2026-04-01 11:45:54 -05:00
Caleb Rackliffe 2184d5cc6b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  ninja-fix: remove SSTable format and disk access mode randomization
2026-03-27 12:07:39 -05:00
ssekaran 32d541557c ninja-fix: remove SSTable format and disk access mode randomization
patch by Shruti Sekaran; reviewed by Caleb Rackliffe and Francisco Guerrero
2026-03-27 11:50:01 -05:00
Matt Byrd 989901e4e0
Ensure schema created before 2.1 without tableId in folder name can be loaded in SnapshotLoader
Best effort attempt to get tableId from CFS, fallback to null which, still allows snapshot to be loaded
End result is that nodetool clearsnapshot and listsnapshot function for such snapshots on restart.

patch by Matt Byrd; reviewed by Stefan Miklosovic, Brandon Williams and Francisco Guerrero for CASSANDRA-21173
2026-03-24 10:36:30 +01:00
Stefan Miklosovic a54d227c86
Rework ZSTD dictionary compression logic to create a trainer per training
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-21209
2026-03-23 18:11:51 +01:00
mck 6590cb5aaf
Change trunk from 5.1 to 6.0
patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-21243
2026-03-21 22:55:40 +01:00
Sam Tunnicliffe 5c07c122be Ninja: increase heap size in LocalRangesAllSettledBench
Follow up to 4454ab8699 (CASSANDRA-21144)
2026-03-19 10:27:57 +00:00
mck 2ce273a118
ninjafix – CassandraRoleManagerTest (CASSANDRA-21202) 2026-03-17 22:07:03 +01:00
Caleb Rackliffe 0bbddf610b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Refactor SAI ANN query execution to use score ordered iterators for correctness and speed
2026-03-17 15:35:08 -05:00
Michael Marshall 23ec1c8a3f Refactor SAI ANN query execution to use score ordered iterators for correctness and speed
Rewrites ANN search query execution logic to more efficiently merge graph search results using
similarity score-ordered (descending) iterators to merge segments efficiently. Allows for reduced memory
consumption during queries, reduced impact of overwrites and tombstones, selective re-querying of
minimally necessary graphs, and reduced shuffling of PrimaryKey objects.

patch by Michael Marshall; reviewed by Caleb Rackliffe and Michael Semb Wever for CASSANDRA-20086
2026-03-17 15:14:13 -05:00
Sam Tunnicliffe 4454ab8699 Improve writePlacementsAllSettled performance in large clusters with many ongoing range movements
Only inflight MSOs which affect the local node need to be
applied to determine the settled local ranges

Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for
CASSANDRA-21144
2026-03-17 11:11:22 +00:00
mck a2e55684de
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Rate limit password changes
2026-03-16 22:04:58 +01:00
mck 1cbdef6272
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Rate limit password changes
2026-03-16 22:04:01 +01:00
mck 17c573f800
Rate limit password changes
Introduces property cassandra.role_password_update_interval_in_ms, with default value of 5000.
Logging added when passwords on roles are changed or are rate-limited.

 patch by Mick Semb Wever; reviewed by Doug Rohrer, Jeremiah Jordan for CASSANDRA-21202
2026-03-16 22:02:41 +01:00
Caleb Rackliffe a78504f541 Revert to making IdentityHashCode#applyAsInt() synchronized for JDK 21
patch by Caleb Rackliffe; reviewed by Dmitry Konstantinov for CASSANDRA-21213
2026-03-16 15:56:47 -05:00
Francisco Guerrero 5bd164477f Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Disallow binding an identity to a superuser when the user is a regular user
2026-03-16 13:40:31 -07:00
Francisco Guerrero b584a43597 Disallow binding an identity to a superuser when the user is a regular user
patch by Francisco Guerrero; reviewed by Mick Semb Wever for CASSANDRA-21219
2026-03-16 13:32:20 -07:00
Sam Tunnicliffe 50c314eaec Consensus groups for range movements can omit future owners of merging ranges
* Expand affected ranges to include removals
* Don't create waiters for replica groups of future ranges not yet in placements

Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for
CASSANDRA-21142
2026-03-16 15:15:23 +00:00
samlightfoot ea3d8a3d31 Wire compaction_read_disk_access_mode through cursor-based compaction
Make MemoryUtil.clean() throw for slices/duplicates that cannot be cleaned and fix mmap cleanup
Parameterise main compaction tests for cursor/iterator and buffered/direct combinations

patch by Sam Lightfoot; reviewed by Ariel Weisberg, Dmitry Konstantinov for CASSANDRA-21147
2026-03-16 11:19:05 +00:00
mck 076c6f1136
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix ConcurrentModificationException in compaction garbagecollect
2026-03-13 22:35:30 +01:00
Joaquin Casares 2b1c8395eb
Fix ConcurrentModificationException in compaction garbagecollect
patch by Joaquin Casares; reviewed by Mick Semb Wever for CASSANDRA-21065
2026-03-13 22:32:06 +01:00
Sunil Ramchandra Pawar 8d325d50ed Allow value/element indexing on frozen collections in SAI
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe, David Capwell, and Andres de la Peña for CASSANDRA-18492
2026-03-13 11:47:23 -05:00
Abhijeet Dubey 88b373a631 Add tool to offline dump cluster metadata and the log
Patch by Abhijeet Dubey; reviewed by Sam Tunnicliffe and marcuse for CASSANDRA-21129
2026-03-13 15:21:19 +01:00
minal-kyada 9bedf98b6e Send client warnings when writing to a large partition
Patch by Minal Kyada; reviewed by David Capwell and marcuse for CASSANDRA-17258
2026-03-13 12:44:30 +01:00
Caleb Rackliffe 87d79f30a0 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Randomize Memtable type/allocation type and SSTable format in Simulator tests
2026-03-11 16:09:47 -05:00
Shruti Sekaran ddfba19f9e Randomize Memtable type/allocation type and SSTable format in Simulator tests
patch by Shruti Sekaran; reviewed by Caleb Rackliffe and Francisco Guerrero for CASSANDRA-21177
2026-03-11 16:05:10 -05:00
Stefan Miklosovic 5519df34cb
Merge branch 'cassandra-5.0' into trunk 2026-03-05 16:13:42 +01:00
Stefan Miklosovic e0ac46c5a7
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-03-05 16:10:01 +01:00
Stefan Miklosovic b41fb1f71a
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-03-05 16:05:39 +01:00
Stefan Miklosovic 547187a229
Obsolete expired SSTables before compaction starts
patch by Stefan Miklosovic; reviewed by Branimir Lambov for CASSANDRA-19776
2026-03-05 16:03:13 +01:00
Maxim Muzafarov c9fe399b06
Move -pp/--print-port from NodetoolCommand to per-command Mixin
Patch by Maxim Muzafarov; reviewed by Stefan Miklosovic for CASSANDRA-20790
2026-03-02 21:16:03 +01:00
Stefan Miklosovic ce983cb89c
Harden the possible range of values for max dictionary size and max total sample size for dictionary training
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-21194
2026-03-02 15:57:22 +01:00
Stefan Miklosovic 43a022c4fc
Implement a guardrail ensuring that minimum training frequency parameter is provided in ZstdDictionaryCompressor
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-21192
2026-03-02 15:52:46 +01:00