Commit Graph

15253 Commits

Author SHA1 Message Date
Mick Semb Wever 5282f81d0a
Fix publishing to ASF Nexus of Accord artefacts when release staging
Also fail the build if any artefacts fail to upload.

 patch by mick semb wever; reviewed by David Capwell for CASSANDRA-21261
2026-07-01 19:25:15 +02:00
Jon Meredith b1f30e94f5 Move long running TCM operations to a longer timout
Replaces the fixed-retry commit loop with deadline-based exponential
backoff for long running CMS commit operations (cms_commit_timeout=1h, 5s-60s jitter)
to allow heavily contended CMS nodes time to commit transforms.

Patch by Jon Meredith and Sam Tunnicliffe; reviewed by Jon Meredith and
Sam Tunnicliffe for CASSANDRA-21453

Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2026-07-01 14:36:28 +01:00
Arvind Kandpal 26d6b4f665
Offline nodetool commands should not print network options in help
- Introduced LocalCommand marker interface to identify commands that execute purely locally without a JMX connection.
- Updated History command to implement LocalCommand.
- Updated CassandraCliHelpLayout to check for LocalCommand instead of calling execution-flow methods, safely suppressing JMX options for offline commands.

patch by Arvind Kandpal; reviewed by Stefan Miklosovic, Maxim Muzafarov for CASSANDRA-20876
2026-06-30 10:23:39 +02:00
Sam Tunnicliffe 896d1d6415 Defer the creation of system_cluster_metadata keyspace until CMS initialization
* Insert the actual PreInitialize entry in the distribute metadata log
  table using a callback after the log is bootstrapped.
* Remove the implicit insert on subsequent commit, i.e. of the Initialize entry
* Enables the full specifics of PreInit to be encoded in the serialized form,
  removing the special casing for the first CMS member and other nodes
* Correctly invalidate cached KeyspaceMetadata when in a pre-initialized state
* Update Host ids in the system.peers_v2 table directly following CMS initialization
* Initialise gossip/local host id after CMS initialization completes
* Clean up CMS initialization errors which occur after the PreInitialize stage

Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
Co-authored-by: Marcus Eriksson <marcuse@apache.org>
2026-06-29 18:09:42 +01:00
samlightfoot 002190748b Support direct I/O for background SSTable writes
Adds an opt-in O_DIRECT write path for background SSTable producers,
bypassing the OS page cache for data that is unlikely to be re-read
soon after being written. Memtable flushes remain buffered.

Enabled via two new YAML knobs:
 - background_write_disk_access_mode: standard (default) | direct
 - direct_write_buffer_size: 1MiB (default; aligned up to FS block
   size, auto-grown to fit a worst-case compressed chunk)

The path is gated by config, table compression being enabled, and an
OperationType allowlist in DataComponent. The allowlist is exhaustive
over OperationType: any new value left unclassified fails static
initialization.

Operations on the DIO path: COMPACTION, MAJOR_COMPACTION,
TOMBSTONE_COMPACTION, ANTICOMPACTION, GARBAGE_COLLECT, CLEANUP,
UPGRADE_SSTABLES, WRITE, STREAM (chunked receiver only), RELOCATE,
UNKNOWN (offline sstablesplit).

Operations off the DIO path:
 - FLUSH (policy: just-flushed data is hot, keep in page cache)
 - SCRUB (correctness: tryAppend needs mark/resetAndTruncate)
 - Zero-Copy Streaming (bypasses DataComponent.buildWriter)
 - Uncompressed writers (only CompressedSequentialWriter has a DIO
   subclass in this change)

StartupChecks fails fast if 'direct' is requested on a platform/FS
that does not support O_DIRECT.

patch by Sam Lightfoot; reviewed by Ariel Weisberg, Dmitry Konstantinov for CASSANDRA-21134
2026-06-24 14:57:46 +01:00
Sam Tunnicliffe 03422edb4b Relax assertion on partitioner instances in SinglePartitionReadCommand
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21251
2026-06-24 14:12:51 +01:00
Dmitry Konstantinov d46b8a827a Report cancelled read command execution to coordinator as a RequestFailure.TIMEOUT
patch by Dmitry Konstantinov; reviewed by Sam Tunnicliffe for CASSANDRA-21468
2026-06-20 15:02:11 +01:00
Maxim Muzafarov d1212e8017
Merge branch 'cassandra-5.0' into cassandra-6.0
* cassandra-5.0:
  Rename conflicting nodetool import --copy-data short option from -p to -cd
2026-06-19 22:24:25 +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
Jon Meredith 44ee9d6167 Unable to catch up TCM Log from peer with gaps in log sequence
Patch by Jon Meredith and Marcus Eriksson; reviewed by Sam Tunnicliffe
for CASSANDRA-21455

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
2026-06-19 16:07:41 +01:00
Stefan Miklosovic 1d81597fdb
Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-19 15:40:29 +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 1bea48858e
Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-19 10:52:09 +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
Maxim Muzafarov 7899b594b8
Speed up nodetool doc generation by producing all command help in a single jvm
patch by Maxim Muzafarov, reviewed by Dmitry Konstantinov for CASSANDRA-21444
2026-06-18 12:08:36 +02:00
Francisco Guerrero c9ffe11645 Merge branch 'cassandra-5.0' into cassandra-6.0
* cassandra-5.0:
  putShortVolatile is not volatile in InMemoryTrie
2026-06-17 06:50:42 -05: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
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 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
Aleksey Yeshchenko ef6367ed10 Fix ReadCommand serializedSize() using incorrect epoch
patch by Aleksey Yeschenko; reviewed by Alex Petrov for CASSANDRA-21438
2026-06-15 11:29:49 +01:00
Aleksey Yeshchenko f67f4ead45 Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-15 11:19:09 +01: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
Matt Byrd 9017e18fa1 Allocation improvements in ProtocolVersion, StorageProxy and MerkleTree
Patch by Matt Byrd; reviewed by Dmitry Konstantinov and marcuse for CASSANDRA-21199
2026-06-09 12:50:00 +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 b6c274933e Minor TokenMap performance improvement
Patch by marcuse; reviewed by Dmitry Konstantinov and Sam Tunnicliffe for CASSANDRA-21223
2026-06-09 08:24:09 +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
Dmitry Konstantinov 88aa5b6807 SEPExecutor.maybeExecuteImmediately does not always execute tasks immediately despite available worker capacity
Additional improvement: use a wait-free logic to return a task or work permit

patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith for CASSANDRA-21429
2026-06-08 22:56:07 +01:00
Maxim Muzafarov 22eb0f9fb7
Merge branch 'cassandra-5.0' into cassandra-6.0
* cassandra-5.0:
  Remove golang dependency in gen-doc and replace with python implementation
2026-06-08 21:54:28 +02:00
Maxim Muzafarov 8c992cb6a5
Remove golang dependency in gen-doc and replace with python implementation
patch by Maxim Muzafarov; reviewed by Dmitry Konstantinov for CASSANDRA-21432
2026-06-08 21:47:08 +02: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
Stefan Miklosovic 57ecd4c101
Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-08 11:12:52 +02: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
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 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 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