Commit Graph

31324 Commits

Author SHA1 Message Date
Dmitry Konstantinov 657d9578f0 Fix version range check in MessagingService.getVersionOrdinal
ninja: remove unused imports in CommandsForRanges to pass checkstyle

Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic, Caleb Rackliffe for CASSANDRA-20842
2025-08-19 18:25:06 +01:00
Benedict Elliott Smith fdff319739 Accord fixes:
- Fix erroneous call to registerWithDelay with absolute deadline
 - ExecuteSyncPoint should discount votes from unbootstrapped replicas
 - Bootstrap no longer needs to first ensure durability (now ExecuteSyncPoint discounts votes from unbootstrapped replicas)
 - Progress stall with home shard stopping before Stable is propagated to all shards
 - Only upgrade Durability.HasPhase if we have queried all shards
 - Incorrectly inferring Durability in CheckStatus.finish
 - Incorrectly inferring/propagating stable from fast unstable reply; clarify to prevent further mistakes
 - MaxDecidedRX should track separate hlc bounds for filtering non-RX dependencies
 - minGcBefore.hlc() can move backwards across epochs, even if each shard moves forwards; must track minHlc directly
 - slowTimeout init in ExecuteTxn.LocalExecute
 - TxnId.parse for RV
Also improve:
 - Don't query recovery state if fast path durably decided
 - Support deferred partial dep deserialisation
 - Support both orientations of KeyDeps/RangeDeps
 - Support partialDeps as ByteBuffer
Also improve in Cassandra:
 - Deps serialization and Journal skipping
 - Don't inflate when reading from cache for CommandsForRanges

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20847
2025-08-19 15:20:26 +01:00
Stefan Miklosovic 9d5cef7f8c
Allow custom constraints to be loaded via SPI
patch by Stefan Miklosovic; reviewed by Bernardo Botella, Saranya Krishnakumar for CASSANDRA-20824
2025-08-18 10:05:38 +02:00
Alex Petrov 9ed9c7cacd Iterate entries in reverse order, as we can not rely on switch atomicity
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20837
2025-08-18 09:39:40 +02:00
Alex Petrov 59b45eb8bf Add max depth to blocked txn vtable
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20839
2025-08-18 09:39:22 +02:00
Dmitry Konstantinov 7fb21c323a Optimize DataPlacement lookup by ReplicationParams
Avoid double lookup of the same DataPlacement in forNonLocalStrategyTokenRead and forNonLocalStrategyTokenWrite methods
Memorize hashCode value for ReplicationParams
Deduplicate ReplicationParams to use the same objects in DataPlacements and KeyspaceMetadata to use the fast == path in the equals
Do not search endpoints for a token in a typical write case twice (to identify pending endpoints)

Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic, Sam Tunnicliffe for CASSANDRA-20804
2025-08-16 16:15:11 +01:00
Maxim Muzafarov ca1dca902c
Fix ShortPaxosSimulationTest and AccordSimulationRunner do not execute from the cli
patch by Maxim Muzafarov; reviewed by Ariel Weisberg for CASSANDRA-20805
2025-08-15 10:46:47 +02:00
Paulo Motta b2037e473f
Allow overriding arbitrary settings via environment variables
This also allows overriding complex settings as a JSON value and adds documentation about these overrides to conf/jvm-server.options

patch by Paulo Motta; reviewed by Stefan Miklosovic, David Capwell for CASSANDRA-20749
2025-08-14 19:00:30 +02:00
Alex Petrov 2de6078289 Improve / simplify topology reporting on startup
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20822
2025-08-14 09:39:22 +02:00
Dmitry Konstantinov 20b94aa784 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add CauseOfInterruption printing if a test split execution is aborted
2025-08-13 20:13:21 +01:00
Dmitry Konstantinov 82880b8be4 Add CauseOfInterruption printing if a test split execution is aborted
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20833
2025-08-13 20:11:15 +01:00
Benedict Elliott Smith 81bc18ad63 Enrich Durability with each phase, so we can both prune unapplied dependencies to mitigate replicas that are behind causing Deps growth,
and more reliably avoid initialising recovery progress log state of transactions that cannot yet make progress
Also fix:
 - Harden AccordExecutor state cleanup to failures
 - Handle SAVING state in AccordCache.tryEvict, as now possible to save for reasons besides eviction so normal to both be in evict queue and saving
 - Infer invalid in MaybeRecover and FetchData
 - MaybeRecover sometimes aborts before home shard knows outcome
 - Epoch sync with VisibilitySyncPoint
 - Retired implies synced
 - Don't interpret force repair as excluding nodes from Accord sync conditions
 - TxnData.without
Also improve:
 - Add Topology.removedNodes
 - If Durability implies we can fetch a status, update the waiting state to fetch it
 - DurableBefore debug table should have searchable txnId

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20832
2025-08-13 11:10:18 +01:00
maoling cdfe2c3dac ninja: remove unused imports in MessagingService to pass checkstyle 2025-08-11 16:32:12 +01:00
Dmitry Konstantinov 7546d9e895 Optimize MessagingService.getVersionOrdinal
The map lookup (with an implicit auto-boxing) can be replaced with a plain arithmetic operation.
A unit test is used to ensure that the assumption about serialization version incrementing for new versions is still correct.
greaterThanOrEqual method is removed as unused.

Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20816
2025-08-08 14:20:13 +01:00
Dmitry Konstantinov 19118a6cff Optimize TrieMemtable#getFlushSet
A flushing range is a combination of partial and full shards, for full shards we use write time captured values for count and total size of partition keys, for partial shards we iterate over keys
When we iterate over partial shards we count key bytes only instead of reading them and also try to skip tokens full parsing

Patch by Dmitry Konstantinov; reviewed by Branimir Lambov for CASSANDRA-20760
2025-08-08 13:34:34 +01:00
Stefan Miklosovic 429b2f8be4
Merge branch 'cassandra-5.0' into trunk 2025-08-08 09:16:21 +02:00
Isaac Reath 170bf57eac
Fix ThreadLocalReadAheadBufferTest to avoid FileNotFoundException when -Djava.io.tmpdir set to /tmp
patch by Isaac Reath; reviewed by Paulo Motta, Stefan Miklosovic for CASSANDRA-20819
2025-08-08 09:00:57 +02:00
maulin-vasavada 2d7f0567a0
Improve sstableloader documentation for SSL configuration
patch by Maulin Vasavada; reviewed by Andrew Tolbert, Stefan Miklosovic for CASSANDRA-20779

Co-authored-by: Andrew Tolbert <6889771+tolbertam@users.noreply.github.com>
2025-08-08 08:45:58 +02:00
Stefan Miklosovic 223f6d47ff
Merge branch 'cassandra-5.0' into trunk 2025-08-08 08:41:18 +02:00
Stefan Miklosovic 902ef57fa3
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-08 08:39:05 +02:00
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