Commit Graph

15185 Commits

Author SHA1 Message Date
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 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
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
Dmitry Konstantinov f06770f036 Reduce memory allocations in SelectStatement.getQuery
SinglePartitionReadCommand.Group#create - typical single partition select, use singletonList instead of ArrayList + Object[]
SelectStatement#getSliceCommands - remove unnessesary cloning of partition key, it is a part of a very old patch, now we copy all values from Netty buffers
SelectStatement#getSliceCommands - typical single partition select, use singletonList instead of ArrayList + Object[]
SinglePartitionReadQuery.Group#maybeValidateIndex, avoid iterators for restrictionSet if a full partition is selected

patch by Dmitry Konstantinov; reviewed by Francisco Guerrero, Stefan Miklosovic for CASSANDRA-21351
2026-05-07 13:31:09 +01:00
Dmitry Konstantinov bfc4b0bb36 Avoid allocation by getFunctions in SelectStatement.authorize
Memorize the result of getFunctions in SelectStatement constructor

patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21347
2026-05-06 13:00:51 +01:00
Stefan Miklosovic 3df9dc242c
Merge branch 'cassandra-5.0' into cassandra-6.0 2026-05-05 10:39:00 +02: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 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
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 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
Dmitry Konstantinov ae418d2a1c Avoid CompactionOptions parsing for every read by WithoutPurgeableTombstones
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21294
2026-04-26 21:59:56 +01: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
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 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
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
mck daadd25fb2
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Paxos v2 cassandra.yaml option
2026-04-18 14:14:53 +02:00
mck 9db2e7ac82
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Paxos v2 cassandra.yaml option
2026-04-18 14:13:21 +02:00
mck 965dd70b23
Paxos v2 cassandra.yaml option
patch by Mick Semb Wever; reviewed by Jon Haddad for CASSANDRA-21316
2026-04-18 14:12:39 +02:00
Dmitry Konstantinov 32162cf544 Change default for cassandra.set_sep_thread_name to false to reduce CPU usage
Add an extra optimization if it is enabled: invoke Thread.setName only if a phase changed

patch by Dmitry Konstantinov; reviewed by Francisco Guerrero, Jyothsna Konisa for CASSANDRA-21089
2026-04-17 13:11:47 +01:00
Stefan Miklosovic 001accf8d2
Merge branch 'cassandra-5.0' into trunk 2026-04-17 11:09:37 +02:00
Stefan Miklosovic edf6034113
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-04-17 10:50:25 +02: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
Stefan Miklosovic 88dd2b2483
Increment version to 5.0.9 2026-04-16 17:28:19 +02:00
Francisco Guerrero 7c3dea92cf Avoid permission checks for masked columns when the table doesn't have any
patch by Francisco Guerrero; reviewed by Shailaja Koppu, Caleb Rackliffe, Dmitry Konstantinov for CASSANDRA-21299
2026-04-15 09:13:50 -07:00
C. Scott Andreas a657f4bef9 Reduce allocations and array copies due to buffer resizing in LocalDataResponse during row serialization
patch by C. Scott Andreas; reviewed by Caleb Rackliffe and Dmitry Konstantinov for CASSANDRA-21285

Co-authored-by: C. Scott Andreas <cscotta@users.noreply.github.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
2026-04-14 08:49:27 -07: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
Dmitry Konstantinov b09bc8b8b0 Avoid capturing lambda allocation in UnfilteredSerializer.deserializeRowBody
The same idea was applied previously in UnfilteredSerializer#serializeRowBody. A state is passed into a consumer function using the existing helper object.

patch by Dmitry Konstantinov; reviewed by Caleb Rackliffe, Francisco Guerrero for CASSANDRA-21289
2026-04-12 12:54:21 +01:00
Dmitry Konstantinov 9bcdf5d746 Avoid Cell iterator for alive rows in MetricsRecording transformation of ReadCommand
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21288
2026-04-12 09:42:31 +01: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
mck 50bf9b6aae
Generation of in-tree html and manpages documentation
patch by Mick Semb Wever; reviewed by Anthony Grasso for CASSANDRA-17260
2026-04-10 19:36:50 +02: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
Stefan Miklosovic 11c858b99f
revert changelog for CASSANDRA-21007 from 6.0-alpha2 as it was delivered in 6.0-alpha1 2026-04-07 15:43:26 +02:00
Mick Semb Wever 88e3fcfe8b
Increment version to 6.0-alpha2 2026-04-04 00:15:39 +02:00
Stefan Miklosovic 0679fea4cb
Merge branch 'cassandra-5.0' into trunk
This merge contains the forgotten entry in 6.0-alpha1 list of changes in CHANGES.txt for CASSANDRA-21007
2026-04-02 17:01:13 +02:00
jkonisa 03dc5a061c
Update cassandra-stress to support TLS 1.3 by default by auto-negotiation
This is a backport of 9d89b47c68 to cassandra-5.0 branch.

patch by Rishabh Saraswat; reviewed by Jyothsna Konisa, Brad Schoening for CASSANDRA-21007
2026-04-02 16:52:53 +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
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 92c69ef626
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Increment versions to 4.0.21, 4.1.12, 5.0.8
2026-03-23 09:56:50 +01:00
mck e418109303
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Increment versions to 4.0.21, 4.1.12, 5.0.8
2026-03-23 09:54:33 +01:00