Commit Graph

28959 Commits

Author SHA1 Message Date
Stefan Miklosovic 2ddb92091c
Prepare debian changelog for 4.1.12 2026-07-28 12:18:07 +02:00
Stefan Miklosovic bde65f163e
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-07-28 11:53:03 +02:00
Stefan Miklosovic 172099f4a8
Prepare debian changelog for 4.0.21 2026-07-28 11:38:14 +02:00
Francisco Guerrero 2507eceb29 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Bound declared value length against readable bytes in CBUtil
2026-07-27 10:01:06 -05:00
Francisco Guerrero 251b0e9b91 Bound declared value length against readable bytes in CBUtil
A 32-bit length field read from the wire by CBUtil.readValue (and its
siblings) flowed directly into new byte[length] with no upper bound,
allowing an unauthenticated client to drive the JVM into
OutOfMemoryError: 'Requested array size exceeds VM limit' — and, with
the default -XX:OnOutOfMemoryError=kill -9 %p, terminate the process —
by declaring Integer.MAX_VALUE as the SASL-token length in AUTH_RESPONSE.

Guard the allocation in the single private readRawBytes(ByteBuf, int)
that all int32-length readers funnel through, rejecting lengths that
exceed the buffer's readable bytes with a ProtocolException.

patch by Francisco Guerrero; reviewed by Stefan Miklosovic for CASSANDRA-21521
2026-07-27 09:51:36 -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 2293c58805
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-07-22 10:46:34 +02:00
Arvind Kandpal 28ec2730bd
Remove unused cassandra.boot_without_jna from cassandra-env.sh documentation
patch by Arvind Kandpal; reviewed by Stefan Miklosovic for CASSANDRA-20611
2026-07-22 10:45:06 +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
Stefan Miklosovic 2beef3f8af
Prepare debian changelog for 4.1.12 2026-07-13 14:05:05 +02:00
Stefan Miklosovic 3bd656f272
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-07-13 13:35:14 +02:00
Stefan Miklosovic 33c1dbe5b8
Prepare debian changelog for 4.0.21 2026-07-13 13:12:00 +02:00
Stefan Miklosovic 19dcb2b784
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-24 13:10:18 +02:00
Arvind Kandpal c2901c71eb
Fix skipped tests and flakiness in CassandraRoleManagerTest
Adds missing @Test annotations to testPasswordUpdateRateLimiting and testPasswordUpdateRateLimitingDisabled.
Also fixes minor typos in comments and assertion strings.
Fix flaky CassandraRoleManagerTest by grouping per-role rate limit checks consecutively.

patch by Arvind Kandpal; reviewed by Stefan Miklosovic, Michael Semb Wever for CASSANDRA-21262
2026-06-24 13:04:14 +02:00
Stefan Miklosovic 003f35ba51
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-06-24 11:21:42 +02:00
maoling 0f9f6dd6e5
Fix flaky Test org.apache.cassandra.io.sstable.VerifyTest.testMutateRepair
patch by Ling Mao; reviewed by Stefan Miklosovic, Dmitry Konstantinov for CASSANDRA-18919
2026-06-24 11:18:15 +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 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 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
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
Patrick McFadin 1a463d753f Merge branch 'cassandra-4.0' into cassandra-4.1
CASSANDRA-21342: Long-tail xref follow-up (cassandra-4.1 subset)

Forward-merge of the cassandra-4.0 long-tail subset onto cassandra-4.1.
Same three files, same six edits as the 4.0 commit.

 patch by Patrick McFadin; reviewed by Mick Semb Wever for CASSANDRA-21342
2026-06-10 10:59:20 -07:00
Patrick McFadin 19ee803038 CASSANDRA-21342: Long-tail xref follow-up (cassandra-4.0 subset)
Subset of the trunk long-tail xref follow-up (commit cc97ee5332)
applicable to cassandra-4.0. Three files have broken patterns that
still apply on this branch after PR #4807's forward-merge: the
architecture index, finding_nodes, and use_tools self-page xrefs.

Six edits total. Mechanical retargets only; no prose was rewritten.

Edits omitted (trunk-only):
* Twenty files introduced in 5.0 or later (developing/cql/, reference/
  cql-commands/, managing/operating/, etc).
* use_tools.adoc edits 4 and 5 (different line state on 4.x;
  packet-capture anchor section structure differs).

 patch by Patrick McFadin; reviewed by Mick Semb Wever for CASSANDRA-21342
2026-06-10 10:59:01 -07: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 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 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
Patrick McFadin a1fc6c8761 CASSANDRA-21342: Fix broken Antora xref/anchor targets in cassandra docs
Forward-merge of the Phase 3 A2 fix from trunk (part of commit
32826fe563) to cassandra-4.0. Retargets the ROOT-nav and ROOT-index
Contact us xrefs from the removed master@_:ROOT:contactus.adoc page
to the existing master@_:ROOT:community.adoc.

The fix is applied as a direct edit rather than a cherry-pick: 4.0's
ROOT/nav.adoc has a different surrounding structure from trunk's (no
ifndef::local-build wrapper, no development sub-nav), so a clean
cherry-pick of the trunk patch is not possible. The net effect on
the targeted xrefs is identical.

 patch by Patrick McFadin; reviewed by TBD for CASSANDRA-21342
2026-05-14 12:36:21 -07:00
Patrick McFadin 1605049780 CASSANDRA-21342: Fix broken Antora xref/anchor targets in cassandra docs
Forward-merge of the Phase 3 A2 fix from trunk (part of commit
32826fe563) to cassandra-4.1. Retargets the ROOT-nav and ROOT-index
Contact us xrefs from the removed master@_:ROOT:contactus.adoc page
to the existing master@_:ROOT:community.adoc.

The fix is applied as a direct edit rather than a cherry-pick: 4.1's
ROOT/nav.adoc has a different surrounding structure from trunk's (no
ifndef::local-build wrapper, no development sub-nav), so a clean
cherry-pick of the trunk patch is not possible. The net effect on
the targeted xrefs is identical.

 patch by Patrick McFadin; reviewed by TBD for CASSANDRA-21342
2026-05-14 12:35:48 -07: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
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
David Capwell 304386a2d2 Merge branch 'cassandra-4.0' into cassandra-4.1 2026-04-17 04:54:08 -07:00
David Capwell de20468edd generate-eclipse-files missing simulator/harry and missing src class path
patch by David Capwell; reviewed by Aleksey Yeschenko for CASSANDRA-21312
2026-04-17 04:51:54 -07: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
Josh McNeil 5e2468bf59 Fix broken linkage in Material View docs
The `ALLOW FILTERING` link was missing a closing square bracket.
2026-04-10 10:34:17 -07:00
finalchild 195d6c76d8 Remove duplicate paragraph in storage_engine.adoc 2026-04-10 09:08:46 -07: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
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
mck 636409baac
Increment versions to 4.0.21, 4.1.12, 5.0.8 2026-03-23 09:51:45 +01:00
Mick Semb Wever 4130d358a4
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Prepare debian changelog for 4.0.20
2026-03-18 01:17:26 +01:00
Mick Semb Wever 3ec081578d
Prepare debian changelog for 4.1.11 2026-03-18 00:19:21 +01:00
Mick Semb Wever c48b9f011d
Prepare debian changelog for 4.0.20 2026-03-17 23:47:42 +01:00