Commit Graph

19606 Commits

Author SHA1 Message Date
Francisco Guerrero 79c8669b84 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Ensure a Message's Response streamId is always set
2026-07-26 20:59:15 -05:00
Francisco Guerrero 9ddfe0fb22 Ensure a Message's Response streamId is always set
patch by Francisco Guerrero; reviewed by Caleb Rackliffe, Benedict Elliot Smith, Tejal Chakeres, Alexander Mitin for CASSANDRA-21508
2026-07-26 20:51:21 -05:00
Stefan Miklosovic bd345213c1
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-07-20 20:43:56 +02:00
Stefan Miklosovic 1c702382de
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-07-20 20:42:36 +02:00
Jeremiah Jordan 26d7b166ba
Verify extension type before initializing reflectively-loaded classes
Cassandra resolves pluggable extensions by class name from configuration, schema, and tooling
inputs. These names were loaded with an initializing Class.forName(name) and type-checked only
afterward, so the named class ran its static initializer before its type was confirmed. After this
change such classes will be loaded without initialization, verified against the expected interface or
base class, and initialized only through normal use after validation.

A shared FBUtilities.classForNameWithoutInitialization helper and typed
instanceOrConstruct/construct overloads apply this to the configurable extension points loaded by
class name: the authentication, authorization, role-management, network and
internode-authenticator backends, the partitioner, audit logger, configuration loader, seed provider,
snitch, abstract types, secondary and custom indexes, compaction strategy, compressor, replication
strategy, SASI analyzers, key and cache providers, query handler, storage and stream hooks, tracing,
the JMX authorization proxy, MBeans, the monotonic clock, nodetool Sjk, triggers, the
sstableloader and stress class options, and diagnostic event classes (loaded without initialization
and checked against DiagnosticEvent, preserving the InvalidClassException contract and the existing
package restriction).

Regression tests confirm that an invalid-type load is rejected without initializing the target
class, and that valid implementations still resolve.

Hadoop client integration and hard-coded JDK and internal class probes are left unchanged.

patch by Jeremiah Jordan; reviewed by Stefan Miklosovic for CASSANDRA-21525
2026-07-20 20:03:45 +02:00
Caleb Rackliffe 4bd98de6ee SAI Component Checksum Validation Should be Segment-Aware
patch by Caleb Rackliffe; reviewed by Francisco Guerrero for CASSANDRA-21516
2026-07-18 22:53:56 -05:00
Dmitry Konstantinov a14a954788 Fix flakiness in CommitLogSegmentManagerCDCTest
Restore deleteCDCRawFiles logic which is present in 6.0 and trunk but probably lost in 5.0 due to merges
Files may be concurrently removed by the CDC management thread, so we tolerate a file that has already been deleted rather than failing the test.
Fix IndexOutOfBoundsException at commitlog.AbstractCommitLogSegmentManager.forceRecycleAll - it is already fixed in 6.0/trunk.
Cleanup test data after run to reduce disk usage.

Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20091
2026-07-12 21:55:58 +01:00
Caleb Rackliffe 448d98ce31 Make synchronization on VectorMemoryIndex inserts more granular
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-21160

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
2026-07-02 15:22:41 -05:00
Patrick Lee db631675df
Fix AssertionError in hasReplicaWithOngoingRepair when parallel_repair_count > 1
patch by Patrick Lee; reviewed by Paulo Motta, Jaydeepkumar Chovatia for CASSANDRA-21426

Co-authored-by: Paulo Motta <paulo@apache.org>
2026-06-24 13:45:43 +02:00
Maxim Muzafarov 3fa111c70f
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Rename conflicting nodetool import --copy-data short option from -p to -cd
2026-06-19 22:17:16 +02:00
Maxim Muzafarov 95088443ff
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Rename conflicting nodetool import --copy-data short option from -p to -cd
2026-06-19 22:00:30 +02:00
Maxim Muzafarov bd835726f2
Rename conflicting nodetool import --copy-data short option from -p to -cd
Patch by Maxim Muzafarov; reviewed by Stefan Miklosovic, Caleb Rackliffe, Bernardo Botella Corbi for CASSANDRA-20214
2026-06-19 21:58:04 +02:00
Stefan Miklosovic 1a87bf5142
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-06-19 15:22:40 +02:00
Stefan Miklosovic 2dbc2f858e
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-19 15:15:32 +02:00
Stefan Miklosovic 22bbac9d6a
Fix PasswordObfuscator failing to obfuscate certain passwords
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-21113
2026-06-19 15:10:04 +02:00
Stefan Miklosovic 4891454021
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-06-19 10:49:41 +02:00
Stefan Miklosovic 6edfd693bc
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-19 10:47:51 +02:00
Stefan Miklosovic d30ac083b8
Fix negative memtable allocator ownership when an update is shadowed by an existing row deletion
When BTreeRow.merge reconciles an update into a row whose existing deletion
shadows the update's cells, it filtered the update (incoming) side of the merge
with Reconciler.retain, which records the removal via
PostReconciliationFunction.delete. On the memtable write path that subtracts the
shadowed cells' on-heap size from the allocator's ownership even though that
incoming data was never allocated to the memtable. Under overwrite/delete churn
that re-applies cells already covered by a newer row/partition deletion (e.g.
repair re-streaming), the allocator's "owns" counter drifts negative and the next
flush trips "AssertionError: Negative released" in MemtablePool$SubPool.released
via MemtableAllocator$SubAllocator.releaseAll during discard.

Filter the update (incoming) side with a non-recording variant,
Reconciler.removeShadowed, and keep retain() for the existing side,
whose data the memtable already owns. The filtered result is identical; only the
erroneous accounting notification is dropped. This mirrors the already-correct
complex-column path in ColumnData.merge.

patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-21469

Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 10:46:04 +02:00
Francisco Guerrero 659c0a526b putShortVolatile is not volatile in InMemoryTrie
This commit fixes several issues found using the Cassandra
edge case explorer skill for the BTI feature.

patch by Francisco Guerrero; reviewed by Aleksey Yeschenko for CASSANDRA-21353
2026-06-17 06:44:45 -05: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
Aleksey Yeshchenko 64a3fc0d3f Fix RequestFailureReason serializer and nits in a few others
patch by Aleksey Yeschenko; reviewed by Alex Petrov for CASSANDRA-21437
2026-06-15 11:16:19 +01:00
Stefan Miklosovic 1c19e860d7
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-06-08 10:56:40 +02:00
Stefan Miklosovic 2bf3bc2925
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-08 10:52:20 +02:00
Cameron Zemek 8aa71cea52
Remove inFlightEcho entry on ECHO_REQ failure
patch by Cameron Zemek; reviewed by Stefan Miklosovic, Caleb Rackliffe for CASSANDRA-21428
2026-06-08 10:47:24 +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
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
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
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
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 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 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
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
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
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
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
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
Stefan Miklosovic c439be9390
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-03-15 18:38:43 +01:00
Stefan Miklosovic 4c7367d739
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-03-15 18:36:43 +01:00