Commit Graph

31458 Commits

Author SHA1 Message Date
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 2fec119f09 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix memory leak in BufferPoolAllocator when a capacity needs to be extended
2025-11-14 17:46:13 +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
Benedict Elliott Smith 494c3c7bef Add AccordExecutorMetrics
Also Introduce:
 - Sharded/LogLinearDecayingHistogram
Also Improve:
 - Do not take a reference to CFK unless relevant
Also Fix:
 - Sharded/LogLinearHistogram
 - ExecuteFlags serialization bug in ReadData

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-21017
2025-11-13 14:36:15 +00:00
Arvind Kandpal cf8050393c ninja: fix typo in NoOpAuditLogger description 2025-11-13 15:44:44 +08: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
Benedict Elliott Smith f6fd49566f Improve DurabilityQueue:
- All retries are appended to a delay queue so overlaps can be pruned
 - Quorum successes are not retried if there are superseding sync points covering the ranges
 - User-initiated requests are not purged unless the request has timed out or otherwise completed
 - Overlapping requests are queued up against the next to run
Alsp (C*):
 - Catch-up with quorums on restart
 - Manage an ordered set of keys in cache for faster range searches
Also (Accord):
 - Update copy of BTree and import IntervalBTree
 - Fix RedundantStatus WAS_OWNED_OVERRIDE_MASK
 - Add Catchup mechanism to reach parity with a quorum on restart

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-21013
2025-11-12 17:20:25 +00:00
Mick Semb Wever 4b7ef7c8f3
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  ninjafix – docker buildx build instructions in .jenkins/k8s/agent-build.docker
2025-11-12 16:36:37 +01:00
Mick Semb Wever 965eb1d223
ninjafix – docker buildx build instructions in .jenkins/k8s/agent-build.docker 2025-11-12 16:36:09 +01: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 f0cb7f1c1a
Merge branch 'cassandra-5.0' into trunk 2025-11-07 14:09:41 +01:00
Stefan Miklosovic 5ea935d6b8
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-11-07 14:04:21 +01:00
Stefan Miklosovic 7b312d4329
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-11-07 13:57:43 +01:00
Ruslan Fomkin 2d7e99f7b9
Document new table name length limit
CASSANDRA-20389 implemented limit on table name length of 222
characters. This commit updates the documentation to reflect this.

It also adds an assert in CreateTableValidationTest to ensure that the
documented limit matches the actual constant.

patch by Ruslan Fomkin; reviewed by Brad Schoening, Dmitry Konstantinov for CASSANDRA-20914
2025-11-07 13:54:03 +01:00
Benedict Elliott Smith aa5c3aba1d Improve Topology Management
Merge ConfigurationService with TopologyManager to remove cyclic dependency and duplicated work.
Also:
 - Improve visibility of work blocking topology processing
 - Ensure we cannot double-count peers when deciding an epoch's distributed readiness
 - Remove the possibility of distributed stalls, by processing new topologies as soon as a
   contiguous sequence is known locally, regardless of whether anyprior local epoch is ready to
   coordinate or has recorded this fact to peers. The notification of local readiness continues
   to be processed only once all prior epochs are ready, but we can begin using and readying
   later epochs immediately.

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20998
2025-11-06 14:38:01 +00: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
Benedict Elliott Smith c9e31f297c Introduce "hardRemoved" concept for marking nodes permanently offline, to permit recovery from availability loss
Also fix:
 - Paxos should not update minHlc if AccordService is not setup
 - Remove EndpointMapper methods that require non-null, to ensure call-sites handle null case explicitly
 - AccordRepair should specify the Node Ids that must participate, but these should not affect the durability requirements for GC
 - Avoid erroneously marking UniversalOrInvalidated when only known to quorum
 - AccordSyncPropagator should not consult FailureDetector as it may throw UnknownEndpointException
 - Refuse ReplaceSameAddress if accord enabled
 - Reset Accord topologies on restart if no local command stores to ensure we can catch up (as intervening epochs may have otherwise been GC'd)
 - MaybeRecover should not abort if found durable if either: 1) prevProgressToken already witnessed durable; or 2) Home state has requested we recover anyway
 - Invariant in MaybeRecover is too strong now we permit recovering when known to be stable
 - ReadData must respond with InsufficientAndWaiting if not Stable to ensure Durability is inferred correctly by ExecuteTxn
 - Avoid StackOverflowException in NotifyWaitingOn
 - PreAccept should honour the REJECTED flag of any member of the latest topology if the vote would be relied upon for any prior epoch's quorum
 - Resume Accord bootstrap on restart
 - Fix burn test non-determinism
 - Reset Accord topologies on restart if no local command stores to ensure we can catch up (as intervening epochs may have otherwise been GC'd)
 - Exclude stale or removed ids from sync points
 - Terminate a failed DurabilityRequest if a required participant is now removed/hardRemoved
Also improve:
 - Introduce accord_debug_keyspace.{listeners_txn, listeners_local}
 - Filter and record faulty in AbstractCoordination
 - If we are the home shard, and our home progress status is done, we should not wait for the home shard to advance the waiting progress state
 - Introduce CommandStore.tryExecuteListening to try to execute all waiting transactions and their dependencies
 - ExecuteTxn on recovery should not wait, to avoid consuming progress log concurrency slots for transactions that cannot execute
 - HomeState should update its phase based on the command status to handle operator request to retry all states
 - Separate home/wait queue in DefaultProgressLog
 - Additional tracing
 - Do not call trySendMore from prerecordFailure
 - Force full recovery for sync points if we have lost quorum

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20921
2025-11-03 15:16:27 +00:00
Mick Semb Wever 0db9d4d926
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  ninja – fix CHANGES.txt (cassandra-4.1 still on 4.1.11)
2025-10-31 09:40:49 +01:00
Mick Semb Wever a3ad539c99
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  ninja – fix CHANGES.txt (cassandra-4.1 still on 4.1.11)
2025-10-31 09:40:29 +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 80938477ef
ninja: get rid of warning during compilation in AccordCQLTestBase.setComplexWithReferenceOnAnotherColumn test by casting stmt.bindsEncoded() value to Object[] to pass to var-arg method 2025-10-29 17:01:44 +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
Benedict Elliott Smith e768418696 Accord: Improve Tracing
- Introduce pattern tracing, that can intercept failed or new coordinations matching various filters
     - Support additional tracing event collection modes (SAMPLE and RING)

    patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20911
2025-10-29 10:16:32 +00:00
Mick Semb Wever cf71b6ee96
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  increment to version 5.0.7
2025-10-29 10:48:58 +01:00
Mick Semb Wever a36b1f15e2
increment to version 5.0.7 2025-10-29 10:47:32 +01:00
Benedict Elliott Smith b712cfb930 RemoteToLocalVirtualKeyspace: supporting access to all nodes' local virtual tables from any node in the cluster
patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20900
2025-10-28 18:51:44 +00:00
Benedict Elliott Smith f7743fe3ab Lazy Virtual Tables
Also Improve:
 - Searchable system_accord_debug.txn
 - Integrate txn_blocked_by deadline and depth filter with execution logic, to ensure we terminate promptly and get a best effort reply

patch by Benedict; reviewed by Aleksey Yeschenko for CASSANDRA-20899
2025-10-28 11:19:37 +00:00
Alex Petrov 3d2b0efc34 Accord: Add Rebootstrap and unsafe Bootstrap
To support recovering a node that has lost some of its local transaction log, introduce rebootstrap and unsafe bootstrap modes, where Accord ensures no responses are produced for transactions the node cannot be certain it had not previously answered.

patch by Benedict and Alex Petrov for CASSANDRA-20908
2025-10-27 14:24:06 +00:00
Mick Semb Wever 0835822acc
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  ninja-fix – Fix (again) eclipse-warnings error for CASSANDRA-19564
2025-10-27 11:05:25 +01:00
Mick Semb Wever dcbadf4dbd
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  ninja-fix – Fix (again) eclipse-warnings error for CASSANDRA-19564
2025-10-27 10:59:01 +01:00
Mick Semb Wever fdc422c16f
ninja-fix – Fix (again) eclipse-warnings error for CASSANDRA-19564 2025-10-27 10:31:08 +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
Jaydeepkumar Chovatia bfcba9c7c4
ninja-fix – Fix eclipse-warnings error for CASSANDRA-19564
```
eclipse-warnings:
     [mkdir] Created dir: /home/jenkins/jenkins-slave/workspace/Cassandra-4.1-artifacts/jdk/jdk_1.8_latest/label/cassandra/build/ecj
      [echo] Running Eclipse Code Analysis.  Output logged to /home/jenkins/jenkins-slave/workspace/Cassandra-4.1-artifacts/jdk/jdk_1.8_latest/label/cassandra/build/ecj/eclipse_compiler_checks.txt
      [java] ----------
      [java] 1. ERROR in /home/jenkins/jenkins-slave/workspace/Cassandra-4.1-artifacts/jdk/jdk_1.8_latest/label/cassandra/src/java/org/apache/cassandra/index/SecondaryIndexManager.java (at line 931)
      [java] 	partition = ImmutableBTreePartition.create(onePartition).unfilteredIterator();
      [java] 	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      [java] Resource 'partition' should be managed by try-with-resource
      [java] ----------
      [java] 1 problem (1 error)
```
2025-10-27 09:46:21 +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