Commit Graph

31354 Commits

Author SHA1 Message Date
Stefan Miklosovic 62150b08d5
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-08 08:36:37 +02:00
Serban Teodorescu f4eb55097e
Add documentation for tombstone threshold metrics
patch by Serban Teodorescu; reviewed by Stefan Miklosovic for CASSANDRA-20803
2025-08-08 08:33:51 +02:00
Stefan Miklosovic ad5a8865dd
Merge branch 'cassandra-5.0' into trunk 2025-08-08 08:27:38 +02:00
k7krishnar f61a1cb58b
Fix typo in audit_logging.adoc 2025-08-08 08:26:29 +02:00
Stefan Miklosovic ce6aef3b77
Merge branch 'cassandra-5.0' into trunk 2025-08-08 08:18:05 +02:00
Stefan Miklosovic 45b296181b
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-08 08:15:34 +02:00
Stefan Miklosovic 483e846442
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-08 08:13:17 +02:00
Alex Gaetano Padula 22e21ad9b2
Update broken link CQL reference in README.asc
patch by Alex Gaetano Padula; reviewed by Stefan Miklosovic for CASSANDRA-20823
2025-08-08 08:07:43 +02:00
David Capwell 6470020dc2 Fix org.apache.cassandra.simulator.test.EpochStressTest so it can run again
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-20812
2025-08-07 11:21:09 -07:00
Benedict Elliott Smith 7b12404a4e Avoid cache modification reentrancy when cancelling loads
Also fix:
 - Catch exceptions thrown by Task.cleanupExclusive to ensure we do not corrupt SequentialExecutor state
 - ConcurrentModificationException with CommandStore.waitingOnSync
 - Exclude promisedHlc that are in the future, even if not equal to Long.MAX_VALUE
 - Filter CFK on load as not expected to be up to date (for later on demand filtering validation)

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20821
2025-08-07 12:45:05 +01:00
Stefan Miklosovic bb7e706213
Merge branch 'cassandra-5.0' into trunk 2025-08-06 18:37:11 +02:00
Romain Hardouin 3b9669b116
Sort SSTable TOC entries for determinism
patch by Romain Hardouin; reviewed by Stefan Miklosovic, Dmitry Konstantinov for CASSANDRA-20494

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-08-06 18:34:26 +02:00
Stefan Miklosovic 8086d67d3b
Merge branch 'cassandra-5.0' into trunk 2025-08-05 14:34:14 +02:00
Stefan Miklosovic 974fc904aa
bump version 2025-08-05 14:33:59 +02:00
Benedict Elliott Smith 46bda174d5 Bootstrap must first wait for a quorum to apply the sync point to ensure the DurableBefore Majority condition holds transitively,
since later quorums may include the bootstrapping node which does not participate in the durability of preceding transactions
Also Improve:
 - Apply MaxDecidedRX filtering to CommandsForKey RX dependencies
 - Optimise AbstractRanges.sliceMinimal (burn test hotspot)
 - Don't start shard schedulers on topology changes if not already started
 - Only registerTransitive if waitingOnSync
 - Reserve DurabilityRequest until ShardDurability is started
 - Don't notify progress log if stopped
 - Remove duplicated CFK unmanaged filtering
Also fix:
 - Edge case in notification across bootstrap boundary by resubmitting Unmanaged to be recomputed
 - Serialization of CommandsForKey.TxnInfo.missing() collection when non-identity flag bits are present

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20811
2025-08-04 08:41:24 +01:00
Benedict Elliott Smith f02020f06d Improve ProgressLog:
- Schedule a fallback timeout for active requests to ensure progress with lost callbacks
 - Clear active task for a txnId when new RunInvoker is registered
 - Consult DurableBefore prior to invoking recovery
 - Support user invoked reset of a command, clearing any active work and requeueing it
 - (Testing): Treat progress log for RX as recurring tasks for burn test termination
Also:
 - Add TxnOps RECOVER, FETCH, RESET_PROGRESS_LOG

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20815
2025-08-03 15:16:00 +01:00
Benedict Elliott Smith 54b2f6acbc Improve:
- system_accord_debug.txn_update->txn_ops + force_apply, force_update, try_execute
 - system_accord_debug.commands_for_key
 - system_accord_debug.commands_for_key_unmanaged
 - system_accord_debug.redundant_before + locally_durable_to_X_store
 - flush accord caches on shutdown

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20814
2025-08-03 15:16:00 +01:00
Caleb Rackliffe eb65c0e600 Support manual secondary index selection at the CQL level
patch by Caleb Rackliffe; reviewed by Andres de la Peña for CASSANDRA-18112

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Andres de la Peña <a.penya.garcia@gmail.com>
2025-08-01 14:42:27 -05:00
Stefan Miklosovic e752ef1511
Merge branch 'cassandra-5.0' into trunk 2025-07-31 12:05:20 +02:00
Stefan Miklosovic c8abc9f3e1
Prepare debian changelog for 5.0.5 2025-07-31 11:40:54 +02:00
Stefan Miklosovic 82e1c3d1c0
Merge branch 'cassandra-5.0' into trunk 2025-07-31 11:16:37 +02:00
Stefan Miklosovic 345df4e723
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-31 11:15:15 +02:00
Dmitry Konstantinov b4210acd3d
Improve CommitLogSegmentReader to skip SyncBlocks correctly in case of CRC errors
patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20664
2025-07-31 11:09:11 +02:00
Stefan Miklosovic 1e5c07af32
Merge branch 'cassandra-5.0' into trunk 2025-07-31 09:22:44 +02:00
Stefan Miklosovic 96a6a7bc12
Do not source cassandra-env.sh unnecessarily in nodetool and other tooling
Sourcing cassandra-env.sh in bin/nodetool just to pick JMX_PORT from there
has undesirable side-effect of not being able to run nodetool when
MAX_HEAP_SIZE in cassandra-env.sh is uncommented.

patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov, Michael Semb Wever for CASSANDRA-20745
2025-07-31 09:15:37 +02:00
David Capwell 6adac494aa When regulars CQL mutations run on Accord use the txn timestamp rather than server timestamp
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20744
2025-07-30 13:19:41 -07:00
Stefan Miklosovic 5aeaef5f77
Merge branch 'cassandra-5.0' into trunk 2025-07-30 17:23:14 +02:00
Stefan Miklosovic cf83f8b2a4
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-30 17:21:45 +02:00
Isaac Reath fcaa1b3e39
Do not crash on first boot with data_disk_usage_max_disk_size set when data directory is not created yet
patch by Isaac Reath; reviewed by Paulo Motta, Stefan Miklosovic for CASSANDRA-20787
2025-07-30 17:19:10 +02:00
Stefan Miklosovic c675bb1c37
Merge branch 'cassandra-5.0' into trunk 2025-07-30 16:44:29 +02:00
Stefan Miklosovic 18aa3445b3
Make source distribution buildable by ant artifacts as doc/scripts/process-native-protocol-specs-in-docker.sh was not executable
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-20802
2025-07-30 16:42:01 +02:00
David Capwell 8c9627076b When using BEGIN TRANSACTION if a complex mutation exists in the same statement as one that uses a reference, then the complex delete is dropped
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20788
2025-07-29 14:18:36 -07:00
Stefan Miklosovic 6fd1194578
Merge branch 'cassandra-5.0' into trunk 2025-07-29 12:33:07 +02:00
Stefan Miklosovic 090a773e1b
Prepare debian changelog for 5.0.5 2025-07-29 12:00:00 +02:00
Benedict Elliott Smith 4102ea13e5 Fix CFK restore after replay:
- Remove from CFK any unapplied transactions we know cannot apply
 - Force notification of waiting commands in CFK on replay
Also fix:
 - Don't truncateWithOutcome if pre bootstrap or stale
 - Fix RangeDeps.without(RangeDeps)
 - Fix InMemoryCommandStore replay bug with clearing DefaultLocalListeners
 - Ensure SaveStatus and executeAt are updated together to prevent corruption via expunge
Improve:
 - Inform home shard that command is decided if we cannot execute, to avoid recovery contention
 - Don't recover sync points on the fast path
 - Don't calculate recovery info for RX (since we don't use it anymore, so no need to do the work)

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20797
2025-07-28 13:32:58 +01:00
Stefan Miklosovic 87069e4dec
Merge branch 'cassandra-5.0' into trunk
This commit only contains in-jvm dtest, logically same as in 5.0, which is ignored as it would fail.
It was identified as part of CASSANDRA-19902 review that trunk branch returns STARTING instead of JOINING operation mode.
This discrepancy between 5.x and trunk is meant to be solved under CASSANDRA-20795.
2025-07-28 09:48:18 +02:00
Paulo Motta 07163cfb51
Fix StorageService JMX mbean not available during bootstrap
Patch by Paulo Motta; reviewed by Stefan Miklosovic for CASSANDRA-19902
2025-07-28 09:28:02 +02:00
Maxim Muzafarov 94b251f3ce
Migrate all nodetool commands from airline to picocli
Replace io.airlift:airline dependency with info.picocli:picocli across
all nodetool command implementations. This migration includes:

- Convert 160+ nodetool command classes from airline to picocli
- Add AbstractCommand base class for commands and utility methods
- Add NodetoolCommand top-level class for the cli utility
- Update all command classes to use @Command, @Option, and @Parameters
- Add plain text files to test command help output
- Add mock test classes for improved test coverage and parse validation
- Modify test infrastructure to work with picocli-based commands
- Add new layouts for cli formatting to preserve backwards compatibility

The migration maintains backward compatibility while providing improved
command-line parsing, better help system, and more robust argument
validation through picocli enhanced features.

patch by Maxim Muzafarov; reviewed by Caleb Rackliffe, Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-17445
2025-07-26 18:19:18 +02:00
Maxim Muzafarov f18d5ad851
ninja: remove unused imports in JournalGCTest and AccordCommandStore to pass checkstyle 2025-07-26 00:45:21 +02:00
David Capwell e48d0dcd2c Journal.TopologyUpdate should not store the local topology as it can be inferred from the global on
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20785
2025-07-24 18:51:24 -07:00
Benedict Elliott Smith 49b99c9319 Fix DurableBefore updates:
- DurableBefore.fullyContainedIn should compare txnId
Also fix:
 - Messages with nullable state should check if they are cancelled after reading the state but before using it
 - Don't snapshot during replay
 - CFK.updateRedundantBefore incorrectly updating mayExecute and sharing byId in some cases
 - Refine GC with global durability bound
 - Fix JournalGCTest

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20786
2025-07-24 20:54:35 +01:00
Benedict Elliott Smith fbe12e6291 Accord Query Tracing
Also improve:
 - Metric listeners

patch by Benedict; reviewed by David Capwell for CASSANDRA-20773
2025-07-24 20:20:17 +01:00
Ariel Weisberg 88805177d2 Fix AccordWriteInteroperability message validation
Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-20770
2025-07-24 11:07:22 -04:00
Stefan Miklosovic e8e312b4d1
Merge branch 'cassandra-5.0' into trunk 2025-07-24 10:27:58 +02:00
Stefan Miklosovic 922819dc08
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-24 10:25:54 +02:00
Stefan Miklosovic f5f71b7fae
Rework / simplification of nodetool get/setguardrailsconfig commands
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-20778
2025-07-24 10:22:55 +02:00
Alex Petrov 53eb2fdac8 Improve GC testing; fix durability startup order
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20767
2025-07-23 14:59:12 +02:00
Benedict Elliott Smith 54e39a90b0 Limit replay to those records not durably persisted to both command store and data store
Also fix:
 - Limit truncation to TruncatedApplyWithOutcome until data is persisted durably to local store
 - IntervalUpdater not invoking super.close()
 - Do not invoke preRunExclusive without holding lock
 - IntervalUpdater not correctly initialise BranchBuilder.inUse
 - AccordExecutor should notify if more work on unlock of caches
 - Relax paranoid CFK validation during restart
Also improve:
 - Flush logs before System.exit
 - Start/stop progress log explicitly
 - Limit progress log concurrency
 - Clear heavy fields in some messages once processed

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20780
2025-07-23 12:19:06 +01:00
Alex Petrov 260c9c9334 Add a way to patch accord journal commands via virtual tables
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20765
2025-07-23 11:06:33 +01:00
David Capwell 0574db7bd9 Accord Route Index does not filter based off txn_id range which causes segments which cant contain the data to be queried
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20772
2025-07-22 15:21:14 -07:00