Commit Graph

31572 Commits

Author SHA1 Message Date
Mick Semb Wever cd707ba67d
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Implement microbench test target type
2026-01-27 20:22:38 +01:00
David Capwell 0fa26aa75d Fix flakey tests due to tests updating SSTable format dynamically
patch by David Capwell; reviewed by Jyothsna Konisa, Nitsan Wakart for CASSANDRA-21130
2026-01-27 09:55:21 -08:00
Maxwell Guo aa3451c55b ninja: add missing CHANGES.txt for CASSANDRA-20081 2026-01-27 19:26:36 +08:00
Mick Semb Wever b3ee9713f8
Implement microbench test target type
Add microbench-test target for quick test run
 Unify declaration and add assertions on target types
 Fix dirname usages for macos
 Parameter for docker_timeout
 Add more jmh class ignores (that are broken)
 Add disableResume() and better host debug to Jenkinsfile

 patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-18873
2026-01-27 11:31:17 +01:00
Maxwell Guo 21c4726b57 ninja: fix import check style problem for CASSANDRA-20081 2026-01-26 20:00:09 +08:00
Maxwell Guo 6d60102422 Enhance nodetool compactionhistory to report compaction type and strategy
patch by Arvind Kandpal; reviewed by Maxwell Guo and Jyothsna Konisa for CASSANDRA-20081
2026-01-26 18:39:40 +08:00
Paulo Motta afa55123c8 Fix initial auto-repairs skipped by too soon check
patch by Paulo Motta; reviewed by Jaydeepkumar Chovatia for CASSANDRA-21115
2026-01-23 11:32:25 -05:00
Paulo Motta 099f376635 Merge branch 'cassandra-5.0' into trunk 2026-01-22 14:19:32 -05:00
Paulo Motta 45afd18a13 Automatically disable zero-copy streaming for legacy sstables
Legacy Cassandra 3.x sstables use an old bloom filter format that is
incompatible with zero-copy streaming in Cassandra 5.0+. This patch
automatically detects sstables with the old bloom filter format
(pre-4.0) and disables zero-copy streaming for them, allowing legacy
sstables to be loaded via sstableloader without requiring manual flags.

The fix adds a version check in CassandraOutgoingFile.computeShouldStreamEntireSSTables()
that calls descriptor.version.hasOldBfFormat() to detect legacy sstables.

patch by Paulo Motta; reviewed by Stefan Miklosovic for CASSANDRA-21092
2026-01-22 14:16:16 -05:00
ireath 7fe688b000 CASSANDRA-21024: Add configuration to disk usage guardrails to stop writes across all replicas of a keyspace when any node replicating that keyspace exceeds the disk usage failure threshold.
This commit adds a new configuration, data_disk_usage_keyspace_wide_protection_enabled, which ensures that if any node which replicates a given keyspace is full, all writes to that keyspace are blocked.

patch by Isaac Reath; reviewed by Stefan Miklosovic, Paulo Motta for CASSANDRA-20124

Closes #4547
2026-01-21 16:53:54 -05:00
Arvind Kandpal bad0a10343 BETWEEN where token(Y) > token(Z) returns wrong answer
patch by Arvind Kandpal; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-20154
2026-01-21 09:33:27 -08:00
Stefan Miklosovic 3885395752
Merge branch 'cassandra-5.0' into trunk 2026-01-20 15:30:22 +01:00
Stefan Miklosovic 039e8b6649
Merge branch 'cassandra-4.1' into cassandra-5.0 2026-01-20 15:27:10 +01:00
Stefan Miklosovic 6a39d88bce
Merge branch 'cassandra-4.0' into cassandra-4.1 2026-01-20 15:19:24 +01:00
omniCoder77 5101d76b21
Fix links in README
patch by Rishabh Saraswat; reviewed by Brad Schoening, Jyothsna Konisa, Stefan Miklosovic for CASSANDRA-21110
2026-01-20 15:14:12 +01:00
Dmitry Konstantinov 39d1149c74 Optimize memtable flush logic
add more flushing stats: partitions/rows, bytes rate, CPU and heap allocation for the flushing thread
avoid columns filtering overheads for unfilteredIterator
do not re-map colums in serializeRowBody if they haven't changed
reduce allocations during serialization of NativeClustering
add fast return for BTreeRow.hasComplexDeletion, avoid column.name.bytes.hashCode if not needed, avoid capturing lambda allocation in UnfilteredSerializer.serializeRowBody
check if Guardrails enabled at the beginning of writing, avoid hidden auto-boxing for logging of primitive parameters
split call sites for in Cell serialize logic, make isCounterCell cheaper (avoid megamorphic call + cache isCounterColumn)
invoke metadataCollector.updateClusteringValues only for first and last clustering key in a partition
enforce inlining for MinMaxIntTracker/MinMaxLongTracker

Patch by Dmitry Konstantinov; reviewed by Branimir Lambov for CASSANDRA-21083
2026-01-19 16:13:40 +00:00
Jaydeepkumar Chovatia aa4da838ec ninja: ant check after CASSANDRA-17401 landed 2026-01-18 21:12:35 -08:00
Jaydeepkumar Chovatia a06df099f4 No need to evict already prepared statements, as it creates a race condition between multiple threads
patch by Jaydeepkumar Chovatia; reviewed by Alex Petrov for CASSANDRA-17401
2026-01-18 20:11:35 -08:00
Alan Wang 8974fdb821 Include Level information for UnifiedCompactionStrategy in nodetool tablestats output
Patch by Alan Wang, reviewed by Jyothsna Konisa and marcuse for CASSANDRA-20820
2026-01-13 14:12:38 +01:00
Stefan Miklosovic a3c40f1a67
ninja: skip AsyncProfiler tests in CI when kernel parameters are not right
Based on the official documentation here (1), AsyncProfiler works best with these kernel parameters.
Not all CI environments have them set. That would fail the tests which run the startup check
if kernel parameters are not like that.

It might be empirically observed that some AsyncProfiler functionality works even without these
kernel parameters, it might be investigated in follow-up work if we should not relax these conditions a bit.

(1) https://github.com/async-profiler/async-profiler/blob/master/docs/GettingStarted.md#before-profiling
2026-01-13 12:26:47 +01:00
Yaman Ziadeh 7c3c3a1d86 Initial async-profiler Nodetool implementation
patch by Yaman Ziadeh, Bernardo Botella, Stefan Miklosovic; reviewed by Dmitry Konstantinov, Jyothsna Konisa for CASSANDRA-20854
2026-01-12 15:02:13 -08:00
Dmitry Konstantinov 3662d758c3 Minor perf optimizations around memtable put logic
Avoid BTree iterators allocation in ColumnsCollector.update
reduce amout of virtual calls for Cell.dataSize
avoid capturing lambda allocation in BTreeRow.clone
do not recalculate minLocalDeletionTime when BTreeRow is cloned
avoid CAS write if EncodingStats is not changed after merge

Patch by Dmitry Konstantinov; reviewed by Jyothsna Konisa, Michael Semb Wever for CASSANDRA-21088
2026-01-10 13:05:54 +03:00
Nivy Kani bc9773ea0a Fix non-determinism of repair fuzz tests by passing randomizer to RetryStrategy
patch by Nivy Kani; reviewed by David Capwell, Jyothsna Konisa for CASSANDRA-21087
2026-01-09 16:17:43 -08:00
David Capwell 86e024b416 NPE when trying to use CAS on local system tables
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-21112
2026-01-09 16:13:01 -08:00
David Capwell 8d11662d6d When level compaction validates its table properties, it used the wrong default value for sstable_size_in_mb which allowed properties that would later be rejected at runtime
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20570
2026-01-09 12:30:38 -08:00
Nivy Kani 386183fce1 Fix off-by-one bug in exponential backoff for repair retry config
patch by Nivy Kani; reviewed by David Capwell, Jyothsna Konisa for CASSANDRA-21102
2026-01-09 10:15:09 -08:00
David Capwell c35c3181fa Fix flakey test org.apache.cassandra.utils.SimpleBitSetSerializersTest#any
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-21077
2026-01-07 16:00:10 -08:00
Stefan Miklosovic 98ec8970e1
Move training parameters for Zstd dictionary compression to CQL
It is also possible to override them via nodetool if necessary.

This patch also fixes the computation of sampling ratio to not lose the precision.

patch by Stefan Miklosovic; reviewed by Jyothsna Konisha, Yifan Cai for CASSANDRA-21078
2026-01-07 16:21:47 +01:00
Maxim Muzafarov 1737efb050
ninja: add a commit with the import order to ignore revs 2025-12-30 22:39:50 +01:00
Maxim Muzafarov 3dc33de6ea
Organize imports and standartize import order across entire codebase
Patch by Maxim Muzafarov; Reviewed by Michael Semb Wever for CASSANDRA-17925
2025-12-30 22:34:14 +01:00
Maxim Muzafarov 9a30a3469c
Add configuration for sorted imports in source files
Patch by Maxim Muzafarov; Reviewed by Michael Semb Wever for CASSANDRA-17925
2025-12-30 22:34:12 +01:00
Stefan Miklosovic 3c69bd2367
ninja: fix tests after CASSANDRA-21074 landed 2025-12-22 13:02:40 +01:00
Stefan Miklosovic b08da36770
Change the eager reference counting of compression dictionaries to lazy
patch by Stefan Miklosovic; reviewed by Yifan Cai, Jyothsna Konisa for CASSANDRA-21074
2025-12-20 15:03:25 +01:00
Mick Semb Wever f0ae1afbe7
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  3.x cqlshlib tests broken on python2.7
2025-12-19 23:55:19 +01:00
Mick Semb Wever fc0ee48ea2
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  3.x cqlshlib tests broken on python2.7
2025-12-19 23:44:01 +01:00
Mick Semb Wever 99db2874ba
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  3.x cqlshlib tests broken on python2.7
2025-12-19 23:43:16 +01:00
Mick Semb Wever 3c66c74a0f
Merge branch 'cassandra-3.11' into cassandra-4.0
* cassandra-3.11:
  3.x cqlshlib tests broken on python2.7
2025-12-19 23:34:52 +01:00
Mick Semb Wever 0293e8b750
Merge branch 'cassandra-3.0' into cassandra-3.11
* cassandra-3.0:
  3.x cqlshlib tests broken on python2.7
2025-12-19 23:34:02 +01:00
Mick Semb Wever 9e04193c3f
3.x cqlshlib tests broken on python2.7
patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-21079
2025-12-19 23:22:13 +01:00
Nitsan Wakart ff78780d61 Add cursor based optimized compaction path
Adds a compaction implementation utilizing new fixed allocation SSTable reader/writer implementations, and other purpose built code, leading to improved efficiencies.

patch by Nitsan Wakart; reviewed by Branimir Lambov, Dmitry Konstantinov for CASSANDRA-20918
2025-12-19 12:45:25 -05:00
Abe Ratnofsky 66a7a36647 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Switch lz4-java to at.yawk.lz4 version due to CVE
2025-12-18 11:02:13 -08:00
Abe Ratnofsky 6fd83986e9 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Switch lz4-java to at.yawk.lz4 version due to CVE
2025-12-18 10:59:09 -08:00
Abe Ratnofsky 2d0fda4511 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Switch lz4-java to at.yawk.lz4 version due to CVE
2025-12-18 10:54:14 -08:00
Abe Ratnofsky ec3b425c38 Switch lz4-java to at.yawk.lz4 version due to CVE
Patch by Abe Ratnofsky; reviewed by Jyothsna Konisa, Dmitry Konstantinov for CASSANDRA-21052
2025-12-18 10:51:26 -08:00
Sam Tunnicliffe ad3f0e8f41 Ensure that gossip state for LEFT nodes is expired eventually
By default the expiry time is calculated on each peer independently. It can be
made to converge by disabling gossip quarantine using the configuration setting
gossip_quarantine_disabled or via a hotprop on GossiperMBean.

Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21035
2025-12-18 10:04:17 +00:00
Lukasz Antoniak 25c7c71b19 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix CQLSSTableWriter serialization of vector of date and time patch by Lukasz Antoniak; reviewed by Andres de la Pena, Yifan Cai for CASSANDRA-20979
2025-12-18 07:41:44 +01:00
Lukasz Antoniak 0136fc9c8f Fix CQLSSTableWriter serialization of vector of date and time
patch by Lukasz Antoniak; reviewed by Andres de la Pena, Yifan Cai for CASSANDRA-20979
2025-12-18 07:35:45 +01:00
Dmitry Konstantinov d2c48faf71 Jenkins: increase splits for simulator-dtest to 2 (support for multiple splits is added) and for test-burn to 4
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever, Jyothsna Konisa for CASSANDRA-21082
2025-12-17 21:33:31 +00:00
Benedict Elliott Smith e14816e244 Journal reads must select segments before sstables to avoid compaction races
Also Fix Cassandra:
 - In memory size calculation for CommandsForKey include Unmanaged
 - Accord load out-of-band cleanup should use SafeRedundantBefore
ALso Improve Cassandra:
 - Report replay information on begin replay
 - Improve AccordService shutdown
 - Log command store RedundantBefore on shutdown
 - Segment compaction should wait for readOrder barrier to replace segments, for additional safety
 - Journal segments should share readOrder with sstables
Also Improve Accord:
 - Iterate LocalListeners in order, so can query more effectively on node
 - Refine AbstractReplay.minReplay/shouldReplay

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-21804
2025-12-17 19:34:44 +00:00
Dmitry Konstantinov c295c33a26 Optimize UTF8Validator.validate for ASCII prefixed Strings
Use a plain loop to check if it is ASCII symbol before going into more complicated UTF8 parsing.
Avoid ValueAccessor to get extra boost for the ASCII check, especially in non-monomorphic cases.

Patch by Dmitry Konstantinov; reviewed by Jyothsna Konisa, Stefan Miklosovic for CASSANDRA-21075
2025-12-17 13:01:18 +00:00