Commit Graph

9131 Commits

Author SHA1 Message Date
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
Benedict Elliott Smith 13a3ae9297 Fix:
- DurabilityQueue/ShardScheduler deadlock
 - MemtableCleanerThread.Cleanup assumes Boolean parameter is non-null, which is invalid if an exception has been thrown
 - AccordDurableOnFlush may be invoked while Accord is starting up, so should use AccordService.unsafeInstance
 - AccordCache shrink without lock regression
 - Cleanup system_accord compaction leftovers before starting up
 - system_accord_debug.txn order
 - system_accord_debug.txn_blocked_by order
 - system_accord_debug.shard_epochs order
Improve:
 - Set DefaultProgressLog.setMode(Catchup) during Catchup
 - IdentityAccumulators only need to readLast, not readAll
 - Limit number of static segments we compact at once to sstable
 - If too many static segments on startup, wait for them to be compacted

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-21053
2025-12-09 14:01:38 +00: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 241f478ce6 Fix flaky ThreadLocalMeterTest by disabling background triggering of ThreadLocalMeter#tickAll within the test case
Patch by Dmitry Konstantinov; reviewed by Brandon Williams, Stefan Miklosovic for CASSANDRA-21056
2025-12-03 16:55:53 +00:00
Valery Baranov 7ed0dc33d0
Add a test for checking permissions after grant authorize
patch by Valery Baranov; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-21051
2025-12-03 16:17:15 +01: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
Yifan Cai 0212713750 Fix flaky test CompressionDictionarySchedulerTest.testScheduleSSTableBasedTrainingWithSSTables
Patch by Yifan Cai; Reviewed by Dmitry Konstantinov for CASSANDRA-21054
2025-12-02 16:13:55 -08: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
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
Benedict Elliott Smith 4b0df8ad6d ninja: fix IndexBuildsAfterStreamingTest regression due to now correctly capturing all uncaught exceptions 2025-11-27 18:23:14 +00:00
Benedict Elliott Smith 4defbb9b1c Make TopologyException a checked exception to ensure they are handled carefully, as they may occur at surprising times
Also Fix:
 - Restore MaxDecidedRX on replay
 - When catchup_on_start_exit_on_failure == false, should startup on any kind of failure, not only timeout
 - lazy vtable LIMIT clause regression
 - DurabilityService.onEpochRetired
 - Command.validate when uniqueHlc differs
 - Avoid unsafe publication of AccordExecutor to scheduledFastTasks
 - AccordCache hitRate metric names
 - use long for return type of DurationSpec.toNanoseconds
 - Repair without all replicas should not request all Accord replicas participate
 - ExecuteAtSerializer
 - SyncPoints should be coordinated in an epoch that contains the ranges
Also Improve:
 - Split Accord startup into local+distributed, ensure we
 - Add logging to FetchDurableBefore on startup
 - Add randomised testing of AbstractLazyVirtualTable
 - Add validation of lazy virtual table key ordering
 - Don't send requests to faulty replicas
 - shrinkOrEvict large objects without holding lock
 - Accord dtest shutdown

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-21042
2025-11-27 13:12:25 +00:00
Sam Tunnicliffe dbfcd52fd5 Fix schema diffs when comments or security labels are modified
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for
CASSANDRA-21045
2025-11-27 11:05:44 +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
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 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