Commit Graph

15257 Commits

Author SHA1 Message Date
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 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
Dmitry Konstantinov d7bd75303f Switch LatencyMetrics to use ThreadLocalTimer/ThreadLocalCounter
Patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith, Jyothsna Konisa for CASSANDRA-21080
2025-12-17 10:38:42 +00:00
David Capwell 9c8ab8809d Accord: write rejections would be returned to users as server errors rather than INVALID and TxnReferenceOperation didn't handle all collections prperly
patch by David Capwell; reviewed by Benedict Elliott Smith, Caleb Rackliffe, Jyothsna Konisa for CASSANDRA-21061
2025-12-15 16:32:07 -08:00
Dmitry Konstantinov 8a72868066 Use byte[] directly in QueryOptions instead of ByteBuffer and convert them to ArrayCell instead of BufferCell.
Additionally replace List with array for bind values (we know the size in advance during a decoding), so in total: List<List> is replaced with byte[][] QueryOptions classes support both ways to get values now: using an old API with ByteBuffer and a new API with byte[].

Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20166
2025-12-15 10:58:43 +00:00
Alan Wang 25390eb8d5 Log queries scanning too many SSTables per read
patch by Alan Wang; reviewed by David Capwell, Marcus Eriksson for CASSANDRA-21048
2025-12-12 14:03:41 -08:00
Sunil Ramchandra Pawar a84abe7ba1 Extend nodetool verify to (optionally) validate SAI files
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-20949
2025-12-12 13:22:06 -06:00
Stefan Miklosovic a14406022d
Merge branch 'cassandra-5.0' into trunk 2025-12-11 11:24:51 +01:00
Stefan Miklosovic f894b8440d
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-12-11 11:10:58 +01:00
Stefan Miklosovic efa0ead445
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-12-11 11:02:05 +01:00
Mikołaj Diakowski 4c33f1f2d7
Restrict BytesType compatibility to scalar types only
Converting collections or UDTs to raw bytes is nonsensical - it
allows reading raw serialized bytes which have no meaningful
interpretation.

patch by Mikołaj Diakowski; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-20982
2025-12-11 10:53:29 +01:00
Stefan Miklosovic f7fab8a60a
Merge branch 'cassandra-5.0' into trunk 2025-12-10 12:41:51 +01:00
Stefan Miklosovic bbbf70a9a2
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-12-10 12:39:43 +01:00
ireath c79f176685
Fix disk usage guardrail disablement when failure threshold is reached
patch by Isaac Reath; reviewed by Jyothsna Konisa, Stefan Miklosovic for CASSANDRA-21057
2025-12-10 12:24:22 +01:00
Stefan Miklosovic 39019f005b
Merge branch 'cassandra-5.0' into trunk 2025-12-10 12:00:59 +01:00
Stefan Miklosovic ced50b0b30
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-12-10 11:58:42 +01:00
Stefan Miklosovic 73648c8215
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-12-10 11:56:34 +01:00
Stefan Miklosovic 34c3736c9e
Backport fix to nodetool gcstats output for direct memory
patch by Stefan Miklosovic; reviewed by Brad Schoening for CASSANDRA-21037
2025-12-10 11:21:16 +01:00
Yifan Cai 21382e6874 Fix CompressionDictionary being closed while still in use
Patch by Yifan Cai; Reviewed by Stefan Miklosovic for CASSANDRA-21047
2025-12-08 14:37:13 -08:00
David Capwell c08666567d When updating a multi cell collection element, if the update is rejected then the shared Row.Builder is not freed causing all future mutations to be rejected
patch by David Capwell; reviewed by Bernardo Botella Corbi, Caleb Rackliffe, Dmitry Konstantinov for CASSANDRA-21055
2025-12-05 16:14:40 -08:00
jkonisa c4e1e2c8a8 CASSANDRA-21046 Schema annotations escape validation on CREATE and ALTER DDL statements
Patch by Jyothsna Konisa; Reviewed by Sam Tunnicliffe, Yifan Cai, Stefan Miklosovic for CASSANDRA-21046
2025-12-05 12:00:39 -08:00
Marcus Eriksson 2b5124d3f6 Merge branch 'cassandra-5.0' into trunk 2025-12-05 12:59:23 +01:00
Marcus Eriksson d17e6d1c6a Merge branch 'cassandra-4.1' into cassandra-5.0 2025-12-05 12:57:49 +01:00
Marcus Eriksson cbf974f2f0 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-12-05 12:57:31 +01:00
Marcus Eriksson 76a7e43613 ArrayIndexOutOfBoundsException with repaired data tracking and counters
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20871
2025-12-05 12:55:59 +01:00
Dmitry Konstantinov a7a85c634a Calculate once and cache the result of ModificationStatement#requiresRead as a perf optimization
Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-21040
2025-12-03 19:14:52 +00:00
Marcus Eriksson b5f8ac2604 Update system schema tables with new distributed keyspace on upgrade
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20872
2025-12-03 14:28:16 +01:00
Marcus Eriksson 7802743460 Fix issue when running cms reconfiguration with paxos repair disabled
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20869
2025-12-03 14:27:21 +01:00
Alan Wang fd2986b8bc
Added additional parameter to JVM shutdown to allow for logs to be properly shutdown
patch by Alan Wang; reviewed by Abe Ratnofsky, Caleb Rackliffe for CASSANDRA-20978
2025-12-01 19:32:51 +01:00
Marcus Eriksson e1e39b074a Refactor the way we check if a transformation is allowed to be committed during upgrades
Patch by marcuse and Sam Tunnicliffe; reviewed by Sam Tunnicliffe for CASSANDRA-21043

Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2025-12-01 10:39:25 +01:00
Marcus Eriksson 4ed54ecb2a Improve isGossipOnlyMember and location lookup performance
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-21039
2025-12-01 10:39:07 +01:00
Mick Semb Wever 53fff0034f
Further Improve debug around paused and disabled compaction
patch by Mick Semb Wever; reviewed by Paulo Motta for CASSANDRA-19728
2025-11-30 21:54:51 +01:00
Sam Tunnicliffe f2406b1070 Merge branch 'cassandra-5.0' into trunk 2025-11-28 11:12:04 +00:00
Sam Tunnicliffe f8f456f0f6 Fix default max interval calculation in FailureDetector
Patch by Sam Tunnicliffe; reviewed by Maxim Muzafarov and Stefan Miklosovic
for CASSANDRA-21025
2025-11-28 09:28:57 +00:00
ireath ce541b6ddf LegacyStateListener should call onRemove for gossip state listeners
Patch by Isaac Reath; reviewed by Sam Tunnicliffe and Paulo Motta for
CASSANDRA-21033
2025-11-28 07:46:45 +00:00
Sam Tunnicliffe 209288cebe Reject PrepareJoin if tokens already assigned
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21006
2025-11-25 17:44:57 +00:00
Sam Tunnicliffe 496959a8f2 Don't update registration status if node state for decommissioned peer is found with the same address
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21005
2025-11-25 16:15:10 +00:00
Sam Tunnicliffe ec7794f20f Avoid NPE when meta keyspace placements are empty before CMS is initialized
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21004
2025-11-25 16:13:42 +00:00
Sam Tunnicliffe 62bd9ab1ae Gossip entries for hibernating non-members don't block truncate
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21003
2025-11-25 16:13:05 +00:00
Sam Tunnicliffe 856db2afa0 Retry without time limit calculates wait time correctly
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21002
2025-11-25 16:10:36 +00:00
Sam Tunnicliffe 44f6a32718 AlterSchemaStatement with no effect locally isn't submitted to CMS
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21001
2025-11-25 16:09:34 +00:00
Marcus Eriksson 2acc420e1c Avoid iterating all prepared statements when getting PreparedStatementsCacheSize metric
Patch by marcuse; reviewed by Dmitry Konstantinov for CASSANDRA-21038
2025-11-25 09:47:38 +01:00
Dmitry Konstantinov a0f97a91f2 Reduce performance impact of TableMetadataRef.get and KeyspaceMetadataRef.get
Move TableMetadataRef.get to init part of bulk operations (such as flush, compaction, scrab)
Cache TableMetadata value within TableMetadataRef to reduce overheads for write operations, same for KeyspaceMetadata

Patch by Dmitry Konstantinov; reviewed by Marcus Eriksson for CASSANDRA-20465
2025-11-22 13:56:38 +00:00
Dmitry Konstantinov 909ed8b949 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix cleanup of old incremental repair sessions in case of owned token range changes or a table deleting
2025-11-22 11:49:07 +00:00
Dmitry Konstantinov 1a12cbb349 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix cleanup of old incremental repair sessions in case of owned token range changes or a table deleting
2025-11-22 11:35:37 +00:00
Dmitry Konstantinov 7f592803a4 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix cleanup of old incremental repair sessions in case of owned token range changes or a table deleting
2025-11-22 11:23:21 +00:00
Dmitry Konstantinov 8d2c11ed2e Fix cleanup of old incremental repair sessions in case of owned token range changes or a table deleting
Patch by Dmitry Konstantinov; reviewed by Marcus Eriksson, Jaydeepkumar Chovatia for CASSANDRA-20877
2025-11-22 11:17:35 +00:00
Sam Tunnicliffe f05b27502f Improve CMS initialization
* Better handling of DOWN unupgraded nodes
* Test that aborted CMS initialization cleans up state properly
* Clean up orphaned PreInitialize entries in the log on bounce
* Unconditionally reset initiator during abort
* Ensure that metadata log entries aren't exchanged before CMS
  initialization is complete
* Precalculate common serialization version, excluding non-upgraded and
  LEFT nodes
* Decide if metadata-impacting upgrade is in progress using min common
  version
* Add metadata identifier to nodetool cms output

Patch by Sam Tunnicliffe and Marcus Eriksson; reviewed by Sam
Tunnicliffe and Marcus Eriksson for CASSANDRA-21036

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2025-11-21 16:40:24 +00:00
jkonisa b11633be4f CASSANDRA-20943 Introducing comments and security labels for schema elements 2025-11-19 11:32:50 -08:00
Stefan Miklosovic dc89b8c802
Extend nodetool tablestats for dictionary memory usage
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-20940
2025-11-19 19:12:26 +01:00
Yuqi Yan e621d8a6c1 Introduce separate GCInspector thresholds for concurrent GC events.
For GC like ShenandoahGC/ZGC etc., there are GC events that do not have STW pauses (Concurrent phases).
Operator might find it reasonable to use lower thresholds for events require STW pauses and higher thresholds for concurrent phases.
gc_concurrent_phase_log_threshold and gc_concurrent_phase_warn_threshold configuration options are introduced in cassandra.yaml

Patch by Yuqi Yan; reviewed by Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-20980
Co-authored-by: Stefan Miklosovic
2025-11-16 21:29:00 +00:00
Dmitry Konstantinov 6b57acc7f4 Reduce contention in MemtableAllocator.allocate
- Estimate memory required to allocate for applying a partition update into a memtable and allocate this memory in one shot, then use it as a request-local SLAB
- Reduce contention by switching MemtableAllocator.SubAllocator#owns from updates via AtomicLongFieldUpdater to LongAdder usage. MemtableAllocator.SubAllocator#acquired(..) method updates "owns" value but does not use the updated result.
- Reduce contention by replacing of CAS loop in MemtablePool.SubPool#tryAllocate with allocatedUpdater.addAndGet(this, size)

Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20226
2025-11-15 15:33:02 +00:00
Dmitry Konstantinov 4cf684b464 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix memory leak in BufferPoolAllocator when a capacity needs to be extended
2025-11-14 17:53:46 +00:00
Dmitry Konstantinov ed7d5840b7 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix memory leak in BufferPoolAllocator when a capacity needs to be extended
2025-11-14 17:34:10 +00:00
Dmitry Konstantinov 3f079b2345 Fix memory leak in BufferPoolAllocator when a capacity needs to be extended
Before the fix during a capacity extension BufferPoolAllocator returned to BufferPool a sliced ByteBuffer wrapper object instead of the originally allocated one, so the ByteBuffer was not recycled by BufferPool
Adjust BufferPoolAllocatorTest to test the ByteBuf capacity extension with a real BufferPool behavior

Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20753
2025-11-14 17:11:25 +00:00
Stefan Miklosovic 99be618ec1
Merge branch 'cassandra-5.0' into trunk 2025-11-13 16:46:06 +01:00
shruti-p-s e2f74ed65b
Adding missing configs in system_views.settings to be backward compatible
patch by Sudipta Laha; reviewed by Stefan Miklosovic, Tiago L. Alves, Francisco Guerrero, Yifan Cai for CASSANDRA-20863
2025-11-13 16:42:38 +01:00
Stefan Miklosovic 136e5fd222
Add export, list, import sub-commands for nodetool compressiondictionary
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-20941
2025-11-13 15:38:42 +01:00
David Capwell f43d9d0f7f Add support in the binary protocol to allow transactions to have multiple conditions
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20883
2025-11-12 10:13:41 -08:00
David Capwell 9a534ba06f Merge branch 'cassandra-5.0' into trunk 2025-11-07 11:53:48 -08:00
David Capwell 4091613298 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-11-07 11:52:14 -08:00
David Capwell e4ea61c1cc Merge branch 'cassandra-4.0' into cassandra-4.1 2025-11-07 11:46:57 -08:00
Nikhil Kumawat 61014f2ae7 Leveled Compaction doesn't validate maxBytesForLevel when the table is altered/created
patch by Nikhil Kumawat, Nikhil; reviewed by David Capwell, guo Maxwell for CASSANDRA-20570
2025-11-07 11:44:12 -08:00
Stefan Miklosovic 1a96b8803a
Enable CQLSSTableWriter to create SSTables compressed with a dictionary
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-20938
2025-11-04 11:11:14 +01:00
Mick Semb Wever fca850c737
ninja – fix CHANGES.txt (cassandra-4.1 still on 4.1.11) 2025-10-31 09:12:20 +01:00
Yifan Cai 307603a4ad Support ZSTD dictionary compression
patch by Yifan Cai; reviewed by Jon Haddad, Stefan Miklosovic for CASSANDRA-17021
2025-10-30 16:18:37 -07:00
Stefan Miklosovic 9142d0c851
Fix ExceptionsTable when stacktrace has zero elements
patch by Stefan Miklosovic; reviewed by Brandon Williams, Dmitry Konstantinov for CASSANDRA-20992
2025-10-30 17:37:17 +01:00
Stefan Miklosovic 397c2668bc
Merge branch 'cassandra-5.0' into trunk 2025-10-29 16:38:10 +01:00
Paulo Motta c3b2303810
Heap dump should not be generated on handled exceptions
Patch by Paulo Motta; Reviewed by Isaac Reath, Stefan Miklosovic for CASSANDRA-20974
2025-10-29 14:54:51 +01:00
Mick Semb Wever 74de57713a
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  ninja-fix – Fix eclipse-warnings error for CASSANDRA-19564
  ReadCommandController should close fast to avoid deadlock when building secondary index
2025-10-27 10:02:07 +01:00
Mick Semb Wever d0c5f6b0ce
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  ninja-fix – Fix eclipse-warnings error for CASSANDRA-19564
  ReadCommandController should close fast to avoid deadlock when building secondary index
2025-10-27 09:52:51 +01:00
Runtian Liu 59574a86a3 ReadCommandController should close fast to avoid deadlock when building secondary index
patch by Runtian Liu; reviewed by Caleb Rackliffe, Jaydeepkumar Chovatia for CASSANDRA-19564
2025-10-26 17:39:39 -07:00
Blake Eggleston e267b2c5df Replace blocking wait with non-blocking delay in paxos repair
Patch by Blake Eggleston; Reviewed by Benedict Elliott Smith for CASSANDRA-20983
2025-10-24 12:14:01 -07:00
Doug Rohrer d40e4ecc09 Merge branch 'cassandra-5.0' into trunk 2025-10-24 14:40:15 -04:00
Doug Rohrer b4dcef7841 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-10-24 14:26:39 -04:00
Doug Rohrer c988b609b0 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  CASSANDRA-20884 - Move JMX classes to the in-jvm-dtest API project
2025-10-24 14:23:42 -04:00
Doug Rohrer aa0e2f1631 CASSANDRA-20884 - Move JMX classes to the in-jvm-dtest API project
patch by Doug Rohrer; reviewed by Francisco Guerrero and Bernardo Botella Corbi for CASSANDRA-20884
2025-10-24 13:37:08 -04:00
Stefan Miklosovic 035a220d55
Implementation of CEP-55 - Generation of role names
patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20897
2025-10-23 13:53:56 +02:00
blambov 9cc3c085de Merge branch 'cassandra-5.0' into trunk 2025-10-20 16:30:49 +03:00
blambov 1db6f54925 Fix range queries on early-open BTI files
patch by Branimir Lambov; reviewed by Stefan Miklosovic for CASSANDRA-20976
2025-10-20 16:28:01 +03:00
Marcus Eriksson 0afa31cd5c Merge branch 'cassandra-5.0' into trunk 2025-10-14 13:21:30 +02:00
Marcus Eriksson e721705152 Avoid re-initializing underlying iterator in LazilyInitializedUnfilteredRowIterator after closing
Patch by marcuse; reviewed by Aleksey Yeschenko and Branimir Lambov for CASSANDRA-20972
2025-10-14 13:19:51 +02:00
Caleb Rackliffe 11278547e1 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Flush SAI segment builder when current SSTable writer is switched
2025-10-13 15:45:20 -05:00
Caleb Rackliffe 98e7cd5d99 Flush SAI segment builder when current SSTable writer is switched
patch by Pranav Shenoy; reviewed by Caleb Rackliffe and Zhao Yang for CASSANDRA-20752
2025-10-13 15:17:27 -05:00
Shalni Sundram accdaaebdd Add cqlsh autocompletion for the identity mapping feature
Patch by Shalni Sundram; reviewed by Francisco Guerrero, Bernardo Botella for CASSANDRA-20021
2025-10-09 16:50:32 -07:00
Aparna Naik 61959e215c Add DDL Guardrail enabling administrators to disallow creation/modification of keyspaces with durable_writes = false
patch by Aparna Naik; reviewed by Caleb Rackliffe and Stefan Miklosovic for CASSANDRA-20913
2025-10-02 15:50:31 -05:00
Dmitry Konstantinov e6a97025bd Optimize Counter, Meter and Histogram metrics using thread local counters
Codahale metrics do not provide the ability to create custom metric implementations, so we have to inherit from Codahale classes.
For better cache locality rate and counter values are extracted to a common thread-local arrays.
Threads death is tracked using 2 approaches: FastThreadLocal.onRemoval callback and phantom references to Thread objects.
Phantom references are used to track aliveness of metric users and reusing of metric IDs.

Patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith for CASSANDRA-20250
2025-09-28 16:47:50 +01:00
Stefan Miklosovic a94736ca50
Update snakeyaml to 2.4
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20928
2025-09-26 20:07:57 +02:00
Stefan Miklosovic 7b4fbde8e4
Update Netty to 4.1.125.Final
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20925
2025-09-26 13:13:58 +02:00
Stefan Miklosovic 608a1b59e2
Merge branch 'cassandra-5.0' into trunk 2025-09-24 10:25:23 +02:00
Stefan Miklosovic b23db408c5
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-09-24 10:22:16 +02:00
Stefan Miklosovic 4a201d4f6f
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-09-24 10:20:21 +02:00
Yifan Cai 90f231ad56
Fixed incorrect error message constant for keyspace name length validation
patch by Yifan Cai; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-20915
2025-09-24 10:13:04 +02:00
Stefan Miklosovic 09c7a3eff0
Merge branch 'cassandra-5.0' into trunk 2025-09-24 09:44:15 +02:00
Stefan Miklosovic 3888949bda
Throw RTE instead of FSError when RTE is thrown from FileUtis.write in TOCComponent
Also simplify the logic in TOCComponent.loadOrCreate.

patch by Stefan Miklosovic; reviewed by Caleb Rackliffe for CASSANDRA-20917
2025-09-24 09:28:46 +02:00
Stefan Miklosovic e42599a094
Expose uncaught exceptions in system_views.uncaught_exceptions table
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-20858
2025-09-23 13:52:00 +02:00
Stefan Miklosovic 02ef8f8a0d
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-09-19 14:18:29 +02:00
Stefan Miklosovic d966547d01
update shaded cassandra-driver-core to 3.11.5
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20904
2025-09-19 14:12:00 +02:00
Raymond Huffman a52d2ce783
Update jackson-dataformat-yaml to 2.19.2 and snakeyaml to 2.1
This is backport of CASSANDRA-18875 to 5.0 where we upgrade 2.1 of snakeyaml and bump jackson-dataformat-yaml to 2.19.2.

The change in trunk (5.1) is about excluding Jackson dependencies from wiremock so 2.19.2 of Jackson is used everywhere in test as well,
otherwise there would be Jackson annotations of 2.13.4 used.

patch by Raymond Huffman; reviewed by Mick Semb Wever and Stefan Miklosovic for CASSANDRA-18875

Co-authored-by: Griffin Davis <gcd@ibm.com>
2025-09-19 13:29:05 +02:00
Stefan Miklosovic 818de8e11e
Merge branch 'cassandra-5.0' into trunk 2025-09-19 12:05:59 +02:00
Marko Tsymbaluk b26e33d506
Represent complex settings as JSON on system_views.settings table
The patch for 5.0 is preserving old behavior, it is possible to turn on JSON representation by a system property.
The patch for trunk is by default transforming collections to JSON string but there is the property (same as in 5.0) which has default to be set to true.

patch by Marko Tsymbaluk; reviewed by Paulo Motta, Stefan Miklosovic for CASSANDRA-20827

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-09-19 11:58:23 +02:00
jaydeepkumar1984 bf2c1c124e Improved observability in AutoRepair to report both expected vs. actual repair bytes and expected vs. actual keyspaces
patch by Jaydeepkumar Chovatia; reviewed by Chris Lohfink for CASSANDRA-20581
2025-09-16 20:38:39 -07:00
Maxwell Guo dddbe1ad87 Execution of CreateTriggerStatement should not rely on external state
patch by Maxwell Guo; reviewed by Sam Tunnicliffe for CASSANDRA-20287
2025-09-15 17:49:05 +08:00
Pranav Shenoy cf806cac1a Support LIKE expressions in filtering queries
patch by Pranav Shenoy; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-17198
2025-09-11 11:20:20 -05:00
Dmitry Konstantinov 06440e947a Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Prevent too long table names not fitting file names
2025-09-10 23:39:17 +01:00
Dmitry Konstantinov 7f92e1ac2c Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Prevent too long table names not fitting file names
2025-09-10 23:09:58 +01:00
Dmitry Konstantinov bff43df7db Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Prevent too long table names not fitting file names
2025-09-10 22:59:34 +01:00
Ruslan Fomkin 6c29686ea7 Prevent too long table names not fitting file names
The length of table names was not controlled. This is likely due to
confusion between validation methods with similar names. As result
creating tables with too long names led to the too long file name
exceptions during table creations.

This commit adds a validation of table name lengths to avoid the too
long file name errors. The validation length is based on how the table
name is used to create file/directory names, and needs to be exact to
prevent the too long file name exception, but allow all other table
names, which didn't lead to the too long file name exception. This
length limit is different from the existing name length limit of 48
characters used by common validation functions.

Thus, this commit moves out the length validation from the validation
methods into a separate length validation method, so the errors on
names are more specific. The non-length validation methods combined
into a single method, which checks for empty names and valid characters.

New constants are added for the length limits.

Table name related code are moved into methods in TableMetadata class,
so their semantics are more clear and to allow reuse, e.g., in
asserting the table name length constant.
Tests are added for the long table names and non-alphanumeric names.

Keyspace name validation function is now shared between two classes and
a unit test of it is added.

Patch by Ruslan Fomkin; reviewed by Piotr Kołaczkowski, Dmitry
Konstantinov, Maxwell Guo for CASSANDRA-20389
2025-09-10 22:48:43 +01:00
Marcus Eriksson 55db3181fb Make legacy index rebuilds safe on Gossip -> TCM upgrades
patch by Caleb Rackliffe; reviewed by Marcus Eriksson for CASSANDRA-20887

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Marcus Eriksson <marcuse@apache.org>
2025-09-09 13:59:26 -05:00
Caleb Rackliffe ed00bf9a93 Minor improvements and hardening for IndexHints
- Enforce a more reasonable limit on the number of included/excluded indexes
- Serialize vints rather than shorts in IndexSetSerializer
- Return Iterable from notExcluded() to avoid set creation
- Avoid redundant iteration in MessagingService#endpointsWithConnectionsOnVersionBelow()

patch by Caleb Rackliffe; reviewed by Marcus Eriksson for CASSANDRA-20888
2025-09-09 11:04:42 -05:00
Himanshu Jindal 965a39166c Stop repair scheduler if two major versions are detected
patch by Himanshu Jindal; reviewed by Jaydeepkumar Chovatia, Andy Tolbert for CASSANDRA-20048
2025-09-08 09:26:31 -07:00
Dmitry Konstantinov ecaa650a50
Optimize audit logic for batch operations especially when audit is not enabled for DML
Avoid audit batch event creation if audit for batch is not enabled (random UIID generation is not very cheap)
Avoid String.format in a potential hot path

Patch by Dmitry Konstantinov; reviewed by Štefan Miklošovič for CASSANDRA-20885
Co-authored-by: Štefan Miklošovič
2025-09-08 16:40:44 +02:00
Stefan Miklosovic 9c93d52ac9
Implement nodetool history
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-20851
2025-09-01 16:18:19 +02:00
Stefan Miklosovic 63fb8741b8
Merge branch 'cassandra-5.0' into trunk 2025-09-01 13:00:36 +02:00
Stefan Miklosovic e45a330f54
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-09-01 12:53:53 +02:00
Stefan Miklosovic c9717b4ed5
Redact security-sensitive information in system_views.settings
patch by Stefan Miklosovic; reviewed by Maxwell Guo, Francisco Guerrero for CASSANDRA-20856
2025-09-01 12:44:43 +02:00
Paulo Motta 06f7f5e265 Merge branch 'cassandra-5.0' into trunk 2025-08-29 14:02:21 -04:00
Paulo Motta c5d6a36fa7 Expose StorageService.dropPreparedStatements via JMX
Patch by Paulo Motta; Reviewed by Dmitry Konstantinov, Jeremiah Jordan for CASSANDRA-20870
2025-08-29 14:00:03 -04:00
Isaac Reath f41b625e48 Expose Metric for Prepared Statement Cache Size (in bytes)
Patch by Isaac Reath; Reviewed by Paulo Motta and guo Maxwell for
CASSANDRA-20864

Closes #4345
2025-08-28 10:54:00 -04:00
Stefan Miklosovic 792e823af0
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-27 19:01:31 +02:00
Dmitry Konstantinov 1c5286f4d1
Fix IndexOutOfBoundsException in sstablemetadata tool when a range tombstone is a max clustering value
patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20855
2025-08-27 18:54:10 +02:00
David Capwell 61b3d5a54b Add support for BEGIN TRANSACTION to allow mutations that touch multiple partitions
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20857
2025-08-25 16:09:28 -07:00
Stefan Miklosovic 9598a96512
Merge branch 'cassandra-5.0' into trunk 2025-08-25 17:44:58 +02:00
Stefan Miklosovic af0197e195
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-25 17:41:43 +02:00
Stefan Miklosovic 6c068b999f
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-25 17:38:44 +02:00
Stefan Miklosovic f9dbfd431e
Update Jackson to 2.19.2
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20848
2025-08-25 17:34:38 +02:00
Stefan Miklosovic 7c6ae891e7
Merge branch 'cassandra-5.0' into trunk 2025-08-25 17:28:31 +02:00
Stefan Miklosovic 4a1c4052af
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-25 17:26:09 +02:00
Stefan Miklosovic aeae910d08
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-25 17:24:10 +02:00
Stefan Miklosovic a64a64b915
Update commons-lang3 to 3.18.0
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20849
2025-08-25 17:21:19 +02:00
Himanshu Jindal daef7b5b98 Safeguard Full repair against disk protection
As per CASSANDRA-20045, we want to prevent full repair against
disk full scenarios. Current protection exists only for incremental
repair. This change updates the config name to not be
incremental repair specific, using the Replace annotation.

patch by Himanshu Jindal; reviewed by David Capwell, Jaydeepkumar Chovatia for CASSANDRA-20045
2025-08-22 14:34:15 -07:00
Andy Tolbert 12dcb130f7 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
2025-08-20 18:00:05 -05:00
Andy Tolbert 3199a958c3 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
2025-08-20 17:55:19 -05:00
Andy Tolbert c9f8d276c2 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
2025-08-20 17:51:48 -05:00
Andy Tolbert 411187f129 Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
Adds setNativeTransportMaxConcurrentConnectionsPerIp and
getNativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean so
these methods can be used from JMX like the
*NativeTransportMaxConcurrentConnections methods.

patch by Andy Tolbert; reviewed by Chris Lohfink for CASSANDRA-20642
2025-08-20 17:46:15 -05:00
Stefan Miklosovic b7e2b3b9dc
Merge branch 'cassandra-5.0' into trunk 2025-08-20 10:55:52 +02:00
Stefan Miklosovic 74e0794d92
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-20 10:53:22 +02:00
Stefan Miklosovic 4824ecc4a5
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-20 10:50:20 +02:00
Stefan Miklosovic eb9586dc68
Make secondary index implementations notified about rows in fully expired SSTables in compaction
patch by Stefan Miklosovic; reviewed by Branimir Lambov for CASSANDRA-20829
2025-08-20 10:42:01 +02:00
David Capwell acec78abf4 BEGIN TRANSACTION crashes if a mutation touches multiple rows
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20844
2025-08-19 18:07:12 -07:00
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
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
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
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 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 974fc904aa
bump version 2025-08-05 14:33:59 +02: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 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
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
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
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
David Capwell 8014eec7aa Merge branch 'cassandra-5.0' into trunk 2025-07-18 16:06:36 -07:00
David Capwell 169c37b030 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-18 16:04:46 -07:00
Yuqi Yan 4962f3da3f IntrusiveStack.accumulate is not accumulating correctly
patch by Yuqi Yan; reviewed by Benedict Elliott Smith, David Capwell for CASSANDRA-20670
2025-07-18 16:02:17 -07:00
Stefan Miklosovic 418e3a4899
Merge branch 'cassandra-5.0' into trunk 2025-07-18 07:52:31 +02:00
Stefan Miklosovic 5fb3ae4473
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-07-18 07:41:32 +02:00
Yuqi Yan 5c94bc8820
Add nodetool get/setguardrailsconfig commands
patch by Yuqi Yan; reviewed by Brandon Williams, Maxwell Guo, Stefan Miklosovic for CASSANDRA-19552

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-07-18 07:25:17 +02:00
David Capwell 8289bb4cde Accord: Topology serializer has a lot of repeated data, can dedup to shrink the cost
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20715
2025-07-10 20:06:02 -07:00
Marcus Eriksson f6c1002e44 Stream individual files in their own transactions and hand over ownership to a parent transaction on completion
patch by Marcus Eriksson; reviewed by Caleb Rackliffe and Jon Meredith for CASSANDRA-20728
2025-07-10 12:57:51 -05:00
Caleb Rackliffe 7b140f6a01 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  SSTableIndexWriter#abort() should log more quietly in cases where an exception is not provided
2025-07-09 13:49:02 -05:00
Caleb Rackliffe f9d759dc38 SSTableIndexWriter#abort() should log more quietly in cases where an exception is not provided
patch by Caleb Rackliffe; reviewed by Jon Meredith for CASSANDRA-20695
2025-07-09 13:41:40 -05:00
Igor Kamyshnikov 7bf6eef9d4
Limit the number of held heap dumps to not consume disk space excessively
patch by Igor Kamyshnikov; reviewed by Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-20457
2025-06-30 11:34:23 +02:00
Caleb Rackliffe 1c2307bd62 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid availability gap between UP and queryability marking for already built SAI indexes on bounce
2025-06-27 11:38:25 -05:00
Caleb Rackliffe f553acea3e Avoid availability gap between UP and queryability marking for already built SAI indexes on bounce
patch by Caleb Rackliffe; reviewed by David Capwell and Dmitry Konstantinov for CASSANDRA-20732
2025-06-27 11:30:13 -05:00
David Capwell 8d641e06fc Accord: BEGIN TRANSACTIONs IF condition logic does not properly support meaningless emptiness and null values
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20667
2025-06-24 21:48:31 -07:00
Maxwell Guo 9a3fda57cd Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Make Commitlog flush data safely in Direct IO mode
2025-06-17 23:33:23 +08:00
Maxwell Guo 8de4c9250e Make Commitlog flush data safely in Direct IO mode
patch by Maxwell Guo; reviewed by Ariel Weisberg for CASSANDRA-20692
2025-06-17 23:24:06 +08:00
Caleb Rackliffe 0a3e624a28 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Get SAI MemtableIndex refs before SSTableIndex refs at query time
2025-06-16 16:06:41 -05:00
Michael Marshall a72dcbc86a Get SAI MemtableIndex refs before SSTableIndex refs at query time
SAI predicate search currently has a bug that could result in missing rows due to a
concurrent flush during a query. The new test created in this PR shows the point of failure.
The problem is that we get the SSTable index references before getting the Memtable index
references. Note that we do it in the correct order in the ANN OF query path, but not
in the WHERE query path.

This commit updates the QueryView object to hold references to the appropriate Memtable indexes.

It also removes the problematic search methods from MemtableIndexManager to prevent future misuse.

patch by Michael Marshall; reviewed by Caleb Rackliffe and Ekaterina Dimitrova for CASSANDRA-20709
2025-06-16 16:00:47 -05:00
David Capwell 4d141e4b0a Accord: startup race condition where accord journal tries to access the 2i index before its ready
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-20686
2025-06-10 14:36:06 -07:00
Ariel Weisberg 83f58b4e1b Merge branch 'cassandra-5.0' into trunk 2025-06-10 16:33:34 -04:00
samlightfoot 53ccfd58f2 Fix MAX_SEGMENT_SIZE < chunkSize in MmappedRegions::updateState
patch by samlightfoot, Szymon Mi<C4><99><C5><BC>a<C5><82>; reviewed by Ariel Weisberg, Michael Semb Wever for CASSANDRA-20636
2025-06-10 16:32:11 -04:00
samlightfoot 58ee847968 Adopt Unsafe::invokeCleaner for Direct ByteBuffer cleaning
Patch by Samuel D Lightfoot; Reviewed by Ariel Weisberg and Abe Ratnosfky for CASSANDRA-20677
2025-06-09 14:14:40 -04:00
maoling 1261ba159c
Add additional metrics around hints
patch by Ling Mao; reviewed by Stefan Miklosovic, Maxim Muzafarov for CASSANDRA-20499

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-06-05 10:55:33 +02:00
Stefan Miklosovic 3a506eb104
Merge branch 'cassandra-5.0' into trunk 2025-06-02 12:31:31 +02:00
Dmitry Konstantinov 3969de6524
Mark JDK 17 as production ready
patch by Dmitry Konstantinov; reviewed by Michael Semb Wever, Stefan Miklosovic for CASSANDRA-20681
2025-06-02 12:15:59 +02:00
Ariel Weisberg 5450a1f20e Support for add and replace in IntervalTree
Patch by Ariel Weisberg and Yuqi Yan; Reviewed by Marcus Eriksson for CASSANDRA-20513

Co-authored-by: Yuqi Yan <yukei0509@gmail.com>
2025-05-29 17:10:55 -04:00
Sam Tunnicliffe 8d89e160fd Ninja fix CHANGES.txt 2025-05-29 10:25:25 +01:00
Caleb Rackliffe fe13726fc6 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure replica filtering protection does not trigger unnecessary short read protection reads
2025-05-28 16:53:06 -05:00
Caleb Rackliffe e5c101673a Ensure replica filtering protection does not trigger unnecessary short read protection reads
patch by Caleb Rackliffe; reviewed by Blake Eggleston and Zhao Yang for CASSANDRA-20639
2025-05-28 16:40:37 -05:00
Andy Tolbert 34650af75a Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:35:02 -05:00
Andy Tolbert e90fece187 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:29:40 -05:00
Andy Tolbert 9c308ce2f3 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:22:41 -05:00
Andy Tolbert d077f69553 Ensure prepared_statement INSERT timestamp precedes eviction DELETE
Updates SystemKeyspace.writePreparedStatement to accept a timestamp
associated with the Prepared creation time. Using this timestamp
will ensure that an INSERT into system.prepared_statements will
always precede the timestamp for the same Prepared in
SystemKeyspace.removePreparedStatement.

This is needed because Caffeine 2.9.2 may evict an entry as soon
as it is inserted if the maximum weight of the cache is exceeded
causing the DELETE to be executed before the INSERT.

Additionally, any clusters currently experiencing a leaky
system.prepared_statements table from this bug may struggle to
bounce into a version with this fix as
SystemKeyspace.loadPreparedPreparedStatements currently does
not paginate the query to system.prepared_statements, causing heap
OOMs.  To fix this this patch adds pagination at 5000 rows and
aborts loading once the cache size is loaded. This should allow
nodes to come up and delete older prepared statements that may no
longer be used as the cache fills up (which should happen immediately).

This patch does not address the issue of Caffeine immediately evicting
a prepared statement, however it will prevent the
system.prepared_statements table from growing unbounded.  For most users
this should be adequate, as the cache should only be filled when there
are erroneously many unique prepared statements. In such a case we can
expect that clients will constantly prepare statements regardless
of whether or not the cache is evicting statements.

patch by Andy Tolbert; reviewed by Berenguer Blasi and Caleb Rackliffe for CASSANDRA-19703
2025-05-27 22:17:15 -05:00
David Capwell cfb393398f Merge branch 'cassandra-5.0' into trunk 2025-05-27 15:24:08 -07:00
Pranav Shenoy 823f48663e Unified Compaction does not properly validate min and target sizes
patch by Pranav Shenoy; reviewed by Branimir Lambov, Claude Warren, David Capwell for CASSANDRA-20398
2025-05-27 15:22:32 -07:00
Caleb Rackliffe 9c489b81a9 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid lambda usage in TrieMemoryIndex range queries and ensure queue size tracking is per column
2025-05-27 15:53:30 -05:00
Caleb Rackliffe dd0d8c03b9 Avoid lambda usage in TrieMemoryIndex range queries and ensure queue size tracking is per column
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20668
2025-05-27 15:44:01 -05:00
Stefan Miklosovic 4154632d16
Merge branch 'cassandra-5.0' into trunk 2025-05-23 17:50:44 +02:00
Brad Schoening 49c8122d8f
Avoid CQLSH throwing an exception loading .cqlshrc on non-supported platforms
While we do not support Windows as such (at least on server), reviewers evaluated that this might be fixed
as the gains (Windows users using CQLSH to connect to Cassandra running on supported platforms) are justified.

patch by Brad Schoening; reviewed by Brandon Williams, Josh McKenzie for CASSANDRA-20478
2025-05-23 17:49:28 +02:00
David Capwell a739e795de Merge branch 'cassandra-5.0' into trunk 2025-05-22 14:17:18 -07:00
David Capwell ac05c94e6a Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-22 14:15:37 -07:00
David Capwell 005d3c28e5 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-05-22 14:14:42 -07:00
David Capwell c736d22cf8 Gossip doesn't converge due to race condition when updating EndpointStates multiple fields
patch by David Capwell, Matt Byrd; reviewed by Blake Eggleston, Brandon Williams for CASSANDRA-20659
2025-05-22 14:12:15 -07:00
Dmitry Konstantinov 063e1fe3d2 Introduce NativeAccessor to avoid new ByteBuffer allocation on flush for each NativeCell
Patch by Dmitry Konstantinov; reviewed by Branimir Lambov for CASSANDRA-20173
2025-05-21 22:16:41 +01:00
Andy Tolbert f80a234d1e Migrate sstableloader code to its own tools directory and artifact
As part of a broader effort to decouple java driver code from the
server code, this moves sstableloader to its own tools directory.

As sstableloader is also used as a library (CASSANDRA-10637), added
a new artifact 'cassandra-sstableloader' that will get deployed to
maven along with 'cassandra-all'.

While I expect this is likely a niche use case, this will allow users
to continue using BulkExport as a library.

Moves sstableloader-specific targets to its own build.xml in
tools/sstableloader/build.xml.

Also updates IDE project files and circleci to utilize new
sstableloader-specific targets.

patch by Andy Tolbert; reviewed by Stefan Miklosovic and Mick Semb Wever for CASSANDRA-20328
2025-05-18 12:35:52 -05:00
jaydeepkumar1984 7ab1e3827c Stop AutoRepair monitoring thread upon Cassandra shutdown
patch by Jaydeepkumar Chovatia; reviewed by Bernardo Botella, Andrew Tolbert for CASSANDRA-20623
2025-05-16 14:47:57 -07:00
Dmitry Konstantinov 95716f6b4b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Relax validation of snapshot name as a part of SSTable files path validation
2025-05-16 13:12:43 +01:00
Dmitry Konstantinov 96b3db90fb Relax validation of snapshot name as a part of SSTable files path validation
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20649
2025-05-16 12:50:42 +01:00
Stefan Miklosovic 6cfea18dda
Avoid duplicate hardlink error upon forceful taking of ephemeral snapshots during repair
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-20490
2025-05-16 09:59:15 +02:00
Marcus Eriksson 629b02599e Merge branch 'cassandra-5.0' into trunk 2025-05-12 13:31:18 +02:00
Marcus Eriksson 29746cffbb Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-12 13:29:36 +02:00
Marcus Eriksson d4fb51347c Merge branch 'cassandra-4.0' into cassandra-4.1 2025-05-12 13:22:01 +02:00
Josh McKenzie f2e3a0a4fc Handle sstable metadata stats file getting a new mtime after compaction has finished
Patch by Josh McKenzie and marcuse; reviewed by Josh McKenzie and marcuse for CASSANDRA-18119
2025-05-12 13:16:50 +02:00
Brandon Williams a39f3b066f Merge branch 'cassandra-5.0' into trunk 2025-05-09 06:26:36 -05:00
Brandon Williams 9e1b09f384 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-09 06:22:50 -05:00
Brandon Williams b4484968bd Use MAX_PARALLEL_TRANSFERS instead of default
Patch by brandonwilliams, reviewed by mck for CASSANDRA-20532
2025-05-09 06:14:59 -05:00
Brandon Williams 43746c13c2 Use MAX_PARALLEL_TRANSFERS instead of default
Patch by brandonwilliams, reviewed by mck for CASSANDRA-20532
2025-05-09 06:10:46 -05:00
Caleb Rackliffe ab1ce5938d Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Optimize initial skipping logic for SAI queries on large partitions
2025-05-08 14:57:13 -05:00
Sunil Ramchandra Pawar 7a8335c273 Optimize initial skipping logic for SAI queries on large partitions
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-20191
2025-05-08 14:28:07 -05:00
Stefan Miklosovic f91655df06
When a custom disk error handler fails to initiate, fail the startup of a node instead of using the no-op handler
patch by Stefan Miklosovic; reviewed by Caleb Rackliffe for CASSANDRA-20614
2025-05-07 08:18:03 +02:00
Stefan Miklosovic c24fbd814a
Rewrite constraint framework to remove column specification from constraint definition, introduce SQL-like NOT NULL
patch by Stefan Miklosovic; reviewed by Bernardo Botella Corbi for CASSANDRA-20563

Co-authored-by: Bernardo Botella Corbi <contacto@bernardobotella.com>
2025-05-06 15:31:39 +02:00
Szymon Miężał 6a81306876 Reading mmapped trie-index exceeding 2GiB results in exception
Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer
bounds.

This patch fixes it by making sure that the buffers are correctly
aligned.

patch by Szymon Miezal; reviewed by blambov and brandonwilliams for CASSANDRA-20351
2025-05-06 06:38:53 -05:00
jaydeepkumar1984 f6eb4a6b31 Fix a bug in AutoRepair duration metric calculation if schedule finishes quickly
patch by Jaydeepkumar Chovatia; reviewed by Andy Tolbert for CASSANDRA-20622
2025-05-05 23:17:42 -05:00
jaydeepkumar1984 f2bf017e6d Fix AutoRepair Flaky InJvm dtest
Patch by Jaydeepkumar Chovatia; Reviewed by Andy Tolbert, Chris Lohfink for CASSANDRA-20620
2025-05-05 17:34:28 -05:00
David Capwell 0a4777dae4 zero copy streaming allocates direct memory that isnt used, but does help to fragment the memory space
patch by David Capwell; reviewed by Yifan Cai for CASSANDRA-20577
2025-05-02 17:00:20 -07:00
David Capwell 4f25e58f26 zero copy streaming allocates direct memory that isn't used, but does help to fragment the memory space
patch by David Capwell; reviewed by Yifan Cai for CASSANDRA-20577
2025-05-02 16:35:38 -07:00
Doug Rohrer 3bc266ca96 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  CASSANDRA-20609 - CQLSSTableWriter should support setting the format (5.0)
2025-05-01 13:50:33 -04:00
Doug Rohrer 2aeb6a0290 CASSANDRA-20609 - CQLSSTableWriter should support setting the format (5.0) 2025-05-01 13:33:57 -04:00
jaydeepkumar1984 58d1cc9b1e Increasing default for auto_repair.sstable_upper_threshold considering large Cassandra tables 2025-04-29 09:36:19 -05:00
Jordan West 84fdf2efd9 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Don't allocate in ThreadLocalReadAheadBuffer#close()
2025-04-28 13:30:03 -07:00
Jordan West 79c59347be Don't allocate in ThreadLocalReadAheadBuffer#close()
Patch by Jordan West; reviewed by Benedict Elliot Smith for CASSANDRA-20551
2025-04-28 13:26:21 -07:00
Marcus Eriksson 5e003af516 Fix token restrictions with MIN_TOKEN
Patch by marcuse and David Capwell; reviewed by David Capwell for CASSANDRA-20557
2025-04-28 15:51:11 +02:00
Caleb Rackliffe 5b0956be4b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure RowFilter#isMutableIntersection() properly evaluates numeric ranges on a single column
2025-04-27 10:15:51 -05:00
Caleb Rackliffe 4bcae8e57e Ensure RowFilter#isMutableIntersection() properly evaluates numeric ranges on a single column
patch by Caleb Rackliffe; reviewed by Ariel Weisberg for CASSANDRA-20566
2025-04-27 09:46:59 -05:00
Nikolay Izhikov fc97fd1037
Upgrade logback version to 1.5.18 and slf4j dependencies to 2.0.17
patch by Nikolay Izhikov; reviewed by Stefan Miklosovic, Maxim Muzafarov, Brandon Williams for CASSANDRA-20429
2025-04-25 14:24:35 +02:00