Commit Graph

8997 Commits

Author SHA1 Message Date
Benedict Elliott Smith 282bacb84b ninja: fix CFK serializer 2025-04-17 11:59:52 -07:00
David Capwell d034661ae2 Support Restart node in Accord
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-19969
2025-04-17 11:59:52 -07:00
Alex Petrov d0a3586bd9 Add purging to Accord Journal table
Patch by Alex Petrov; reviewed by Aleksey Yeshchenko and Benedict Elliott Smith for CASSANDRA-19877
2025-04-17 11:59:52 -07:00
Benedict Elliott Smith 562894dcb1 improve AccordLoadTest to support more keys 2025-04-17 11:59:52 -07:00
Alex Petrov 1c269348a4 Implement Journal replay on startup:
* reconstruct CFK, TFK, progressLog
  * migrate CommandStore collection state from Accord table to the log
  * make memtable writes non-durable; reconstruct memtable state from Writes

Patch by Alex Petrov and Benedict Elliott Smith; reviewed by Benedict Elliott Smith and Alex Petrov for CASSANDRA-19869
2025-04-17 11:59:52 -07:00
David Capwell 1ed52038ce This commits contains the following two patches in order to reduce the amount of conflicts resolution necessary for future rebasing:
(Accord): C* stores table in Range which will cause ranges to be removed from Accord when DROP TABLE is performed
patch by David Capwell, Sam Tunnicliffe; reviewed by Sam Tunnicliffe for CASSANDRA-18675

CEP-15: (Accord) sequence EpochReady.coordinating to allow syncComplete to be learned from newer epochs
patch by David Capwell; reviewed by Alex Petrov, Blake Eggleston for CASSANDRA-19769
2025-04-17 11:59:52 -07:00
Blake Eggleston fbfb633bda CEP-15 (C*) - misc accord perf improvements
Patch by Blake Eggleston; Reviewed by David Capwell for CASSANDRA-19940

Changes:
Increase accord repair range splitting
Streamline table metadata fetching - removes some unnecessary abstraction from the table metadata lookup path
Remote unnecessary set building when building lists of overlapping keys
Add separate recover delay for repair and increase default recover delay
2025-04-17 11:59:51 -07:00
Blake Eggleston dd1230f2a2 CEP-15 (C*): Read accord repair cfk keys from sstable index.
Patch by Blake Eggleston; Reviewed by David Capwell for CASSANDRA-19920
2025-04-17 11:59:51 -07:00
David Capwell 8f7532bc10 Rebase fixup: Accord should follow the pattern and use requestTime.computeDeadline like the rest of the code, and Accord timeout MUST be less than user timeout
Rebase fixup: when a local keyspace is being open but it isnt present return null so error msg can be provided
Rebase fixup: improved metrics error msg when the exception doesnt match what is expected
Rebase improvement: when we see a timeout or preempt use the new vtable to show the status cross the cluster
Rebase improvement: Cluster.checkForThreadLeaks now groups similar stack traces to make the output less dense
2025-04-17 11:59:51 -07:00
David Capwell f87c22cbbd Rebase fixup: SerializationsTest needed to recreate the service.SyncComplete.bin file 2025-04-17 11:59:51 -07:00
Alex Petrov ef5f793dab Journal segment compaction
Patch by Alex Petrov and Aleksey Yeschenko, reviewed by Aleksey Yeschenko and Alex Petrov for CASSANDRA-19876
2025-04-17 11:59:51 -07:00
Benedict Elliott Smith 9ebce5d6df Redesign progress mechanisms to be memory efficient, use fewer messages and to resolve dependency chains promptly.
The SimpleProgressLog had a number of problems:

1. It polled for progress with no attempt to determine whether progress could realistically be made, so:
 - as the number of pending transactions grew, the proportion of useful work dropped (as many would be unable to make progress without earlier transactions completing)
 - each transaction in the chain could recover only on average 1/2 poll interval behind the last transaction to complete
2. It requested full transaction state from every replica on each attempt
3. It maintained a lot of in-memory state
4. Polling happened en-masse, allowing for little per-transaction control

We also separately maintained fairly expensive per-command listener state that negatively affected our command loading and caching.

The new DefaultProgressLog makes use of several new features: LocalListeners, RemoteListeners, Timers and Await messages.
 - LocalListeners provide a memory-efficient collection for managing each CommandStore<E2><80><99>s transaction listeners, with dedicated record keeping for inter-transaction relationships.
 - RemoteListeners provide a mechanism for request/response pairs that may be separated by longer than the normal Cassandra message timeout, and require minimal state on sender and recipient. This permits replicas to cheaply update their local state machine as soon as distributed information becomes available.

The DefaultProgressLog tracks each transaction with separate timers to handle per-transaction scheduling, backoff etc, and a succinct state machine. To reduce overhead correspondence is preferentially limited to a handful of replicas, and limited to the home shard where appropriate.

patch by Benedict; reviewed by Ariel Weisberg for CASSANDRA-19870
2025-04-17 11:59:51 -07:00
David Capwell f1db115e73 Create a fuzz test that randomizes topology changes, cluster actions, and CQL operations
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-19847
2025-04-17 11:59:51 -07:00
David Capwell a21c0a75aa Add a table to inspect the current state of a txn
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-19838
2025-04-17 11:59:51 -07:00
Caleb Rackliffe 2b01b5fa79 Command to Exclude Replicas from Durability Status Coordination
patch by Caleb Rackliffe; reviewed by David Capwell, Sam Tunnicliffe, and Benedict Elliott Smith for CASSANDRA-19321
2025-04-17 11:59:51 -07:00
Alex Petrov 325e48ac39 Switch to streaming serialization of SavedCommand
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-19865

Co-authored-by: dcapwell <dcapwell@gmail.com>
2025-04-17 11:59:51 -07:00
David Capwell 26d517f4ff txns that update a static row when the desired row doesn't exist leads to an error
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-19855
2025-04-17 11:59:51 -07:00
Alex Petrov b757cb8730 Add size to the segment index for safer journal reads
Patch by Alex Petrov; reviewed by Marcus Eriksson for CASSANDRA-19871
2025-04-17 11:59:51 -07:00
Alex Petrov c16297f862 Add an ability to reconstruct arbitrary epoch state from the log to TCM
Patch by Alex Petrov; reviewed by Marcus Eriksson for CASSANDRA-19790.
2025-04-17 11:59:51 -07:00
David Capwell a7c2bcafcd CommandsForRanges does not support slice which cause over returned data being sent
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-19857
2025-04-17 11:59:51 -07:00
Ariel Weisberg 8ab5003118 Accord migration and interop correctness
Patch by Ariel Weisberg; Reviewed by Blake Eggleston for CASSANDRA-19744
2025-04-17 11:59:51 -07:00
Benedict Elliott Smith c377a066af CASSANDRA-19825: Fix various bugs and abstraction deficiencies, including:
- Remove concept of non-participating home keys; home keys are required to be a participant in the transaction
- Remove covering/covers concept
- Various invalidation/truncation/erase behaviours

patch by Benedict; reviewed by Blake for CASSANDRA-19825
2025-04-17 11:59:51 -07:00
Benedict Elliott Smith 6905157b0e CommandsForKey Improvements incl Pruning
CommandsForKey periodically self-prunes, so as to continue functioning well in-between garbage collections. Once we prune we are left with potentially incomplete information, and have to sometimes load per-command information from disk. But the payoff is ensuring CommandsForKey objects - which drive the majority of the state machine - are kept to a reasonable size.

patch by Benedict; reviewed by Blake Eggleston and David Capwell
2025-04-17 11:59:51 -07:00
Youki Shiraishi 6d01bc2535 CEP-15 (Accord): When starting a transaction in a table where Accord is not enabled, should fail fast rather than fail with lack of ranges
patch by Youki Shiraishi; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-19759
2025-04-17 11:59:51 -07:00
Alex Petrov 1439fe8d31 Bring back Journal simulator (w/o Accord at least for now); add semaphore interceptor.
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-19695.
2025-04-17 11:59:51 -07:00
David Capwell 0d4c0961be CEP-15: (Accord) When nodes are removed from a cluster, need to update topology tracking to avoid being blocked
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-19719
2025-04-17 11:59:51 -07:00
Benedict Elliott Smith ac58a62c51 Introduce Periodic mode to Accord Journal
patch by Benedict; reviewed by Aleksey Yeschenko, Alex Petrov and David Capwell for CASSANDRA-19720
2025-04-17 11:59:51 -07:00
David Capwell d83de7fbb4 CEP-15: (Accord) SyncPoint timeouts become a Exhausted rather than a Timeout and doesn’t get retried
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-19718
2025-04-17 11:59:50 -07:00
David Capwell 39efba9c6a CEP-15: (Accord) Bootstraps LocalOnly txn can not be recreated from SerializerSupport
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-19674
2025-04-17 11:59:50 -07:00
Ariel Weisberg feb8d2e2b2 Accord barrier/inclusive sync point fixes
Patch by Ariel Weisberg, Benedict Elliott Smith; reviewed by Benedict Elliott Smith for CASSANDRA-19641
2025-04-17 11:59:50 -07:00
Caleb Rackliffe 1c87bb96ed Baseline Diagnostic vtables for Accord
patch by Caleb Rackliffe; reviewed by David Capwell and Ariel Weisberg for CASSANDRA-18732
2025-04-17 11:59:50 -07:00
David Capwell 11ed5309b5 IndexOutOfBoundsException while serializing CommandsForKey
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-19642
2025-04-17 11:59:50 -07:00
Aleksey Yeschenko 3127c558d3 Move preaccept expiration logic away from Agent
patch by Aleksey Yeschenko; reviewed by Alex Petrov and Benedict Elliott Smith for CASSANDRA-18888
2025-04-17 11:59:50 -07:00
Caleb Rackliffe 1b3c3f32a4 post-rebase fixes, mostly around CASSANDRA-19341 and CASSANDRA-19567 2025-04-17 11:59:50 -07:00
Caleb Rackliffe 418f8bf3f0 Prohibit counter column access in Accord transactions
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-18987
2025-04-17 11:59:50 -07:00
Blake Eggleston 543210ae12 CEP-15 (C*) Integrate accord with repair
Patch by Blake Eggleston; Reviewed by Ariel Weisberg and David Capwell for CASSANDRA-19472
2025-04-17 11:59:50 -07:00
David Capwell 8f7f9b083e When jvm-dtest is shutting down an instance TCM retries block the shutdown causing the test to fail
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-19514
2025-04-17 11:59:50 -07:00
David Capwell 64da7141f7 (Accord) Cassandra bootstrap no longer using the range txn and instead uses the sync point empty txn for reads
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-19503
2025-04-17 11:59:50 -07:00
David Capwell 777cf84f64 Accord: PreLoadContext must properly and consistently support ranges
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-19355
2025-04-17 11:59:50 -07:00
Benedict Elliott Smith 7dadc080cb perf improvements 2025-04-17 11:59:50 -07:00
Blake Eggleston 599cd59736 post-trunk rebase fixes 2025-04-17 11:59:50 -07:00
Blake Eggleston d3deef36d3 CEP-15: (C*) per-table transactional configuration
Patch by Blake Eggleston; Reviewed by Ariel Wesberg for CASSANDRA-19016
2025-04-17 11:59:50 -07:00
Benedict Elliott Smith 763bcf2de5 Fast single-partition "Ephemeral Reads"
Introduce a special kind of non-durable read that provides only per-key linearizable isolation; i.e. strict-serializable isolation for single partition-key reads.
This read creates only a happens-before edge, by collecting dependencies for execution and ensuring that execution happens strictly after these dependencies
have executed, but at no precise time otherwise. So later writes may be witnessed, and if multiple keys are read they may represents different points in time.

patch by Benedict; reviewed by Ariel Weisberg for CASSANDRA-19305

Refactor CommandsForKey for efficiency, and to support transitive dependency elision

patch by Benedict; reviewed by Aleksey Yeshchenko for CASSANDRA-19310
2025-04-17 11:59:50 -07:00
David Capwell a324003c59 Get simulator working (again)
Co-authored-by: Ariel Weisberg <aweisberg@apple.com>
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
2025-04-17 11:59:49 -07:00
Benedict Elliott Smith 8de3dfc711 CASSANDRA-18365: Protocol fixes 2025-04-17 11:59:49 -07:00
Aleksey Yeschenko 20af77031a Pre-requisite changes for CASSANDRA-18888
patch by Aleksey Yeschenko; reviewed by Ariel Weisberg for
CASSANDRA-18888
2025-04-17 11:59:49 -07:00
David Capwell 633bbee1a6 (Accord): Bug fixes from CASSANDRA-18675 to better support adding keyspaces
patch by David Capwell; reviewed by Benedict Elliott Smith, Blake Eggleston for CASSANDRA-18804
2025-04-17 11:59:49 -07:00
David Capwell a95f072e35 (Accord) NPE while trying to serialize FoundKnownMap as value is null half the time but unexpected while serializing
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-19253
2025-04-17 11:59:49 -07:00
Blake Eggleston cb1a05c5d4 Schema based accord fast path configuration
Patch by Blake Eggleston; Reviewed by David Capwell and Alex Petrov for CASSANDRA-19009
2025-04-17 11:59:49 -07:00
Blake Eggleston e812127a8b Fix TombstoneCountWarningTest
Don't use ImmediateExectuor in JVM dtests to process messages
Fix GuardrailTablesTest
Instance.receiveMessage should use sync
Fix StorageAttachedIndexDDLTest failing due to background Accord compactions
Add back enforceInvariants=false to shouldCleanup in AccordCommandsPurger
Fix CompactionAccordIteratorsTest
Fix empty row check in command/tfk mutation methods
2025-04-17 11:59:49 -07:00
Ariel Weisberg 021b06639e Fix Mutation serializer
Fix AccordJournal.Type interop entries
2025-04-17 11:59:49 -07:00
Ariel Weisberg a9cb71833a Fix additional live migration/interop merge issues
s fc83325fa9 Fix AccordObjectSizes empty sizes
s 44bce6a08c Fix error handling when there are no column families to repair
s f1459540e5 Fix broken nowInSec deserialization
s 91c1befd1c Fix Mutation serializedSize
s b11467c200 Using simulated clock instead of raw nanoTime
s 6412b35924 Accord repair needs to use sentinel tokens
s d19c01ff01 Enable Accord repair with HappyPathFuzzTest
s 2da87f91b8 Implement abort in AccordRepairJob
s e12877c4fa move barrier to accord spec

Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-19023
2025-04-17 11:59:49 -07:00
Blake Eggleston d07a36106d Reduce command deps
Patch by Blake Eggleston; Reviewed by Benedict Elliott Smith for CASSANDRA-18784
2025-04-17 11:59:49 -07:00
Benedict Elliott Smith 050688228f Improve validation and address various discovered faults
patch by Benedict; reviewed by Ariel Weisberg for CASSANDRA-19045
2025-04-17 11:59:49 -07:00
Aleksey Yeschenko 0e899532dc Quick fix for AccordCommandStoreTest#commandLoadSave() 2025-04-17 11:59:49 -07:00
Ariel Weisberg 4c575a7e48 Fix Paxos V2 prepare response serialization
Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-19023
2025-04-17 11:59:49 -07:00
Ariel Weisberg c10c84b9cd Accord/non-Accord interoperability and support for live migration
Patch by Ariel Weisberg; Reviewed by Blake Eggleston for CASSANDRA-18129

Co-authored-by: Blake Eggleston <beggleston@apple.com>
2025-04-17 11:59:49 -07:00
Jon Meredith 9e766f46a3 Several simulator fixes not yet merged to cep-15-accord
s c4bf1533b4 Add more JVM arg checks to the paxos simulation runner
s 1b650a0636 break circular dependency between FileSystemOwnershipCheck and CassandraRelevantProperties
s e0111748dd fix verify with-rng and interrupts
s f8475f2a18 make SimulatedFailureDetector deterministic
s ee77734bbe Deterministic transformation
s 890f23696a Add mechanism forsimulator to intercept password salting
s 5205b99874 Specify Paxos V2 because it is the only linearizable option

Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-19008
2025-04-17 11:59:49 -07:00
David Capwell 18d3aa47bc CEP-15: (C*) Implement TopologySorter to prioritise hosts based on DynamicSnitch and/or topology layout
patch by Blake Eggleston, David Capwell; reviewed by Blake Eggleston for CASSANDRA-18929
2025-04-17 11:59:49 -07:00
Jacek Lewandowski dfd1e99fd1 CEP-15: Add Accord configuration stub
Patch by Jacek Lewandowski; reviewed by David Capwell for CASSANDRA-18221
2025-04-17 11:59:49 -07:00
Jacek Lewandowski 27a9313970 CEP-15: Accord metrics
Patch by Jacek Lewandowski, reviewed by Caleb Rackliffe, David Capwell and Henrik Ingo for CASSANDRA-18580
2025-04-17 11:59:49 -07:00
Caleb Rackliffe cffe1cc61a ninja-fix: minor post-TCM-rebase cleanup 2025-04-17 11:59:49 -07:00
Caleb Rackliffe 19fcbcab61 ninja-fix: checkstyle fixes in VirtualTableTest, HistoryValidatorTest, SeedDefiner, RunStartDefiner, and Config 2025-04-17 11:59:48 -07:00
Aleksey Yeschenko c0a63c9164 CEP-15: Minimize transaction state kept in system tables
patch by Aleksey Yeschenko; reviewed by Ariel Weisberg for CASSANDRA-18573
2025-04-17 11:59:48 -07:00
Caleb Rackliffe 08428a2750 - Avoid persisting fragments that do not require completion as Updates in TxnWrite, as they can simply be pulled from PartialTxn when needed in Write#apply()
- Avoid serializing full TxnData instances to Accord state tables

patch by Caleb Rackliffe; reviewed by David Capwell, Benedict Elliot Smith, and Ariel Weisberg for CASSANDRA-18355
2025-04-17 11:59:48 -07:00
David Capwell 10e065ffe5 Fix Accord compaction purger tombstone logic
Accord compaction purgers see random slices of Accord state during compaction (based on randomly selected compaction inputs).

For at least the `durability` column in the `commands` table the tombstone being created when truncating was deleting the latest value since we can get enough information to truncate without actuall yhaving the latest `durability` value.

To fix we can wait to emit a tombstone until we are erasing the entire command row when truncating or truncating with outcome and meanwhile we can drop the extra columns that are no longer needed instead of using a tombstone. We don't need to emit cell tombstones we can drop them from the purger when processing each row.

patch by Ariel Weisberg; reviewed by David Capwell for CASSANDRA-18795
2025-04-17 11:59:48 -07:00
Blake Eggleston ba02bd0bc7 Bootstrap/TCM integration test fixes 2025-04-17 11:59:48 -07:00
David Capwell 6167e436c3 CEP-15 (C*): when loading commands that have empty waiting_on, make sure not to loose the partial deps (#3590)
patch by David Capwell; reviewed by Aleksey Yeschenko for CASSANDRA-18783
2025-04-17 11:59:48 -07:00
Ariel Weisberg 82acd3e950 Allow exceptions to be propagated remotely
https://github.com/apache/cassandra-accord/pull/56

Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-18779
2025-04-17 11:59:48 -07:00
David Capwell 76994f8196 CEP-15 (C*) When a host replacement happens don't loose the peer mapping right away (#3575)
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-18764
2025-04-17 11:59:48 -07:00
Benedict Elliott Smith a6bb08d926 Support state eviction (i.e. permit the state machine to erase transactions that are known to be applied across the cluster)
patch by Benedict Elliott Smith; reviewed by Ariel Weisberg, Aleksey Yeschenko, and David Capwell for CASSANDRA-18883

Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Ariel Weisberg <aweisberg@apple.com>
Co-authored-by: Aleksey Yeschenko <aleksey@apache.org>
Co-authored-by: David Capwell <dcapwell@gmail.com>
2025-04-17 11:59:48 -07:00
Blake Eggleston 00bbf4ec8e CEP-15: Accord Bootstrap Integration
Patch by Blake Eggleston and Benedict Elliott Smith; Reviewed by David
Capwell for CASSANDRA-17101

CEP-15: Accord TCM integration

Patch by Blake Eggleston; Reviewed by David Capwell for CASSANDRA-18444
2025-04-17 11:59:48 -07:00
Aleksey Yeschenko 145c467c69 CEP-15: Convert AccordStateCache cache from write-through to write-back
patch by Aleksey Yeschenko; reviewed by Blake Eggleston for
CASSANDRA-18563
2025-04-17 11:59:48 -07:00
Aleksey Yeschenko 8f156fc5dc CEP-15: Extend Accord MessageType with a side effect flag
patch by Aleksey Yeschenko; reviewed by Benedic Elliott Smith for
CASSANDRA-18561
2025-04-17 11:59:48 -07:00
David Capwell f76f806de1 CEP-15: (C*) Add notion of CommandsForRanges and make this durable in C*
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-18519
2025-04-17 11:59:48 -07:00
Caleb Rackliffe f54144d1c1 - make sure workspace.xml specifies a storagedir
- removing unnecessary calls to ServerTestUtils.daemonInitialization() in a handful of tests
- minor cleanup in Verb and BTreeSet
2025-04-17 11:59:48 -07:00
Benedict Elliott Smith 537c1f991a (Accord only) Permit nodes to join a cluster without the full transaction history
patch by Benedict; reviewed by Blake Eggleston for CASSANDRA-18523
2025-04-17 11:59:48 -07:00
Aleksey Yeschenko 8dc82a6369 CEP-15: Store PreAccept, Accept, Commit, and Apply messages
in a durable log before processing by CommandStores

patch by Aleksey Yeschenko; reviewed by David Capwell for
CASSANDRA-18344
2025-04-17 11:59:48 -07:00
David Capwell da92eed225 CEP-15: (C*) Enhance in-memory FileSystem to work with mmap and support tests to add custom logic
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-18485
2025-04-17 11:59:48 -07:00
David Capwell 8633a301f7 CEP-15: (C*) Accord message processing should avoid being passed on to a Stage and run directly in the messageing handler
patch by David Capwell; reviewed by Ariel Weisberg, Benedict Elliott Smith for CASSANDRA-18364
2025-04-17 11:59:48 -07:00
David Capwell 7ad2bf672c CEP-15 (Accord) Original and recover coordinators may hit a race condition with PreApply where reads and writes are interleaved, causing one of the coordinators to see the writes from the other
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-18422
2025-04-17 11:59:48 -07:00
David Capwell 44824a6e45 CEP-15 (Accord) Expected reply message with verb ACCORD_INFORM_OF_TXNID_RSP but got ACCORD_SIMPLE_RSP
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-18375
2025-04-17 11:59:48 -07:00
David Capwell 4e95e3a440 Operations.migrateReadRequiredOperations fails due to concurrent access when TransactionStatement is prepared
patch by David Capwell; reviewed by Ariel Weisberg, Caleb Rackliffe for CASSANDRA-18337
2025-04-17 11:59:48 -07:00
Caleb Rackliffe 68135aaf29 fixing remaining (mostly compilation) issues after initial rebase of cep-15-accord on cep-21-tcm 2025-04-17 11:59:48 -07:00
Jacek Lewandowski ea71336278 Improve transaction statement validation
patch by Jacek Lewandowski; reviewed by David Capwell and Caleb Rackliffe for CASSANDRA-18302
2025-04-17 11:59:48 -07:00
David Capwell f092461114 CEP-15: (Accord) Migrate Accord away from JDK random to a new interface RandomSource
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-18213
2025-04-17 11:59:48 -07:00
Blake Eggleston 34bd73e2a7 CEP-15/Accord Immutable State Refactor
Patch by Blake Eggleston; Reviewed by David Capwell and Benedict Elliott Smith for Cassandra-18192
2025-04-17 11:59:48 -07:00
Blake Eggleston e6a8c030c1 add AsyncChain implementations and tests
Patch by Blake Eggleston; Reviewed by David Capwell & Benedict Elliott Smith for CASSANDRA-18004
2025-04-17 11:59:47 -07:00
Blake Eggleston 09c8fa1030 CEP-15 (C*): Messaging and storage engine integration
patch by Blake Eggleston; reviewed by Benedict Elliott Smith, David Capwell for CASSANDRA-17103
2025-04-17 11:59:47 -07:00
David Capwell e1823e0e22 Merge branch 'cassandra-5.0' into trunk 2025-04-16 15:22:56 -07:00
Sunil Ramchandra Pawar 4436b84a5a SAI fails queries when multiple columns exist and a non-indexed column is a composite with a map
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-19891
2025-04-16 15:21:49 -07:00
David Capwell 6b2cdba56b AST fuzz tests can be flakey in multi node clusters due to ephemeral read errors caused by a race condition issue with SAIUtils test class
patch by David Capwell; reviewed by Bernardo Botella Corbi, Caleb Rackliffe for CASSANDRA-20550
2025-04-15 10:24:08 -07:00
Bereng f7462446a4 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  CASSANDRA-19633 Replaced node is stuck in a loop calculating ranges
2025-04-14 09:24:36 +02:00
Bereng 0f9bb246cd Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  CASSANDRA-19633 Replaced node is stuck in a loop calculating ranges
2025-04-14 09:23:14 +02:00
Bereng 3e2e4c3ea1 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  CASSANDRA-19633 Replaced node is stuck in a loop calculating ranges
2025-04-14 09:21:58 +02:00
Bereng fcea0b6fd8 CASSANDRA-19633 Replaced node is stuck in a loop calculating ranges 2025-04-14 09:20:33 +02:00
Francisco Guerrero d3658f0491 Fix JMX initialization problem in injvm-dtest framework
Patch by Francisco Guerrerro, Doug Rohrer; reviewed by TBD for CASSANDRA-20539

Co-authored-by: Doug Rohrer <jeetkundoug@apache.org>
2025-04-11 15:51:55 -07:00
Marcus Eriksson 2c05f82755 Add nodetool command to dump the contents of the system_views.{cluster_metadata_log, cluster_metadata_directory} tables
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20525
2025-04-11 13:48:34 +02:00
Marcus Eriksson 6f79207c34 Improve metadata log catch up with inter-DC mutation forwarding
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20523
2025-04-11 13:44:42 +02:00
Sam Tunnicliffe 7a888149df Support topology-safe changes to Datacenter & Rack for live nodes
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for
CASSANDRA-20528
2025-04-11 11:53:09 +01:00
Caleb Rackliffe 30f1429e6d Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid purging deletions in RowFilter when reconciliation is required
2025-04-10 22:38:20 -05:00
Caleb Rackliffe 725e4ba3eb Avoid purging deletions in RowFilter when reconciliation is required
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20541
2025-04-10 22:31:53 -05:00
Jordan West 0e408e6175 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix test failure with negative position in ThreadLocalReadAheadBufferTest
2025-04-10 11:42:25 -07:00
Jordan West bcd5c48307 Fix test failure with negative position in ThreadLocalReadAheadBufferTest
patch by Jordan West; reviewed by Jon Haddad, Dmitry Konstantinov for CASSANDRA-20507
2025-04-10 11:39:51 -07:00
David Capwell 6472340d93 AST Harrys multi node tests are flakey when multi cell list happens cross instances
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20544
2025-04-09 13:06:28 -07:00
Caleb Rackliffe ef0eec07f8 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fixed multiple single-node SAI query bugs relating to static columns
  - Ensure MemtableIndexWriter calculates min/max properly with indexes on partition key elements
  - Ensure only rows with live data are indexed
  - Ensure min cannot be greater than max in intersection statistics with static keys
  - Correct tracking of last key in the searcher in the presence of static keys
2025-04-08 22:12:39 -05:00
Caleb Rackliffe 4e2e5f3c57 Fixed multiple single-node SAI query bugs relating to static columns
- Ensure MemtableIndexWriter calculates min/max properly with indexes on partition key elements
- Ensure only rows with live data are indexed
- Ensure min cannot be greater than max in intersection statistics with static keys
- Correct tracking of last key in the searcher in the presence of static keys

patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20338
2025-04-08 21:58:21 -05:00
David Capwell d06e496773 Update AST Harry CAS fuzz tests to validate the CAS response
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20517
2025-04-08 18:26:15 -07:00
Ariel Weisberg 67df6a5bff Add SSTableIntervalTree latency metric
Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-20502
2025-04-08 15:30:56 -04:00
Ariel Weisberg ec00426584 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-04-08 15:18:23 -04:00
Ariel Weisberg 96bfbe6250 Dropwizard Meter causes timeouts when infrequently used
patch by Ariel Weisberg; reviewed by Maxim Muzafarov for CASSANDRA-19332
2025-04-08 15:16:08 -04:00
mck 54bca21dab
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Upgrade java-driver-core to 3.12.1 and org.apache coords
2025-04-07 16:15:50 +02:00
mck 694a88bdbe
Upgrade java-driver-core to 3.12.1 and org.apache coords
patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-17231
2025-04-07 15:45:39 +02:00
Marcus Eriksson b31d15b9b5 Avoid failing queries when epoch changes and replica goes up/down
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20489
2025-04-07 08:09:21 +02:00
Ekaterina Dimitrova 50978a0d07 CASSANDRA-20402: Add new reason RequestFailureReason.INDEX_BUILD_IN_PROGRESS
and IndexBuildInProgress exception when queries fail during index build

patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe for CASSANDRA-20402
2025-04-04 09:52:15 -04:00
Blake Eggleston 45df7627d5 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix mixed mode paxos hang
2025-04-03 15:31:03 -07:00
Blake Eggleston eaa20275ff Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix mixed mode paxos hang
2025-04-03 15:28:19 -07:00
Blake Eggleston cf60eb8672 Fix mixed mode paxos hang
- reinstates the mrc check from CASSANDRA-12043 for legacy paxos purging

Patch by Blake Eggleston; Reviewed by Ariel Weisberg for CASSANDRA-20514
2025-04-03 15:22:45 -07:00
Doug Rohrer b01274d6f6 CASSANDRA-20496 - Add CQLSSTableWriter tests for Vectors and Constraints
New features in the storage engine need to be appropriately tested in the CQLSSTableWriter code
so they can be used in the Analytics library and others utilizing the writer library.
Add a test for support of Vector data types and constraints to ensure they work with the
CQLSSTableWriter and make any changes necessary if they don’t.

patch by Doug Rohrer; reviewed by Bernardo Botella, Stefan Miklosovic for CASSANDRA-20496
2025-04-02 15:34:19 -04:00
Stefan Miklosovic bb66561142
Various fixes in constraint framework
- fix some edge cases for NOT_NULL
- ability to specify constraints when altering a column
- ensure constraint is specified on a column it is bound to
- fix nullity check on map type
- fix satistfiability check on function constraints

patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20481
2025-03-31 14:42:31 +02:00
David Capwell b56edf2a5d Add support in CAS for -= on numeric types, and fixed improper handling of empty bytes which lead to NPE
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20477
2025-03-28 15:06:52 -07:00
Blake Eggleston 4e8bfd25ba Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  convert legacy zero ballots to 4.1 zero value on deserialization
2025-03-28 14:14:34 -07:00
Blake Eggleston 31235c4314 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  convert legacy zero ballots to 4.1 zero value on deserialization
2025-03-28 14:12:32 -07:00
Blake Eggleston 2a5749f203 convert legacy zero ballots to 4.1 zero value on deserialization
Patch by Blake Eggleston, reviewed by Alex Petrov and Ariel Weisberg for CASSANDRA-20493
2025-03-28 14:10:18 -07:00
Mick Semb Wever 607fae54b3
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add LegacySSTableTest data for past sstable formats
  Fix comment in BigFormat wrt when nb was introduced
2025-03-28 12:45:51 +01:00
Roxana Neophytou ab51b79473
Add LegacySSTableTest data for past sstable formats
Also add test method testVerifyOldTupleSSTables for frozen tuples and dropping of them.

The test data also adds different versions of me format sstables from C* version 3.0.25 and 3.11.11 as they do (unfortunately) differ. Test sstable files have had their sequence generation ids changed to represent the server version used to create them, while this shouldn't be necessary it is for debug purposes when sstable formats have changed between versions.

 patch by Roxana Neophytou, Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-20485

Co-authored-by: mck <mck@apache.org>
2025-03-28 12:33:28 +01:00
Stefan Miklosovic 9843b3d40e
Do not fail to start a node with materialized views after they are turned off in config
patch by Stefan Miklosovic; reviewed by Maxwell Guo for CASSANDRA-20452
2025-03-28 09:12:21 +01:00
maoling 009146959a
Fix nodetool gcstats output, support human-readable units and more output formats
nodetool gcstats output was broken as such / not aligned.
This command was using a completely custom way of displaying the statistics which was fixed.

This patch also supports three output modes: table, yaml, json under -F flag.
There is also a possibility to output the figures in human-friendly format via -H flag.

The patch also adds more JVM statistics related to direct memory besides
already existing "allocated direct memory" being:
 - max direct memory
 - reserved direct memory

patch by Ling Mao; reviewed by Brad Schoening, Stefan Miklosovic for CASSANDRA-19022

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-03-28 09:10:39 +01:00
Dmitry Konstantinov 5fa6b03e8b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix CommitlogShutdownTest flakiness by testing a real drain logic instead an emulation which is affected by background activities for system tables
2025-03-27 13:22:12 +00:00
Dmitry Konstantinov 10f66d5ccb Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix CommitlogShutdownTest flakiness by testing a real drain logic instead an emulation which is affected by background activities for system tables
2025-03-27 13:12:14 +00:00
Dmitry Konstantinov 1a0ea33188 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix CommitlogShutdownTest flakiness by testing a real drain logic instead an emulation which is affected by background activities for system tables
2025-03-27 12:48:55 +00:00
Dmitry Konstantinov bc8941e377 Fix CommitlogShutdownTest flakiness by testing a real drain logic instead an emulation which is affected by background activities for system tables
Patch by Dmitry Konstantinov; reviewed by Josh McKenzie for CASSANDRA-19101
2025-03-27 12:19:55 +00:00
Marcus Eriksson 4318e74180 Various gossip to TCM upgrade fixes
patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20483
2025-03-26 13:45:16 +01:00
Marcus Eriksson 4fb81ea483 Add nodetool command to abort failed nodetool cms initialize
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20482
2025-03-26 13:44:39 +01:00
Sam Tunnicliffe 51e01a3862 Repair Paxos for the distributed metadata log when CMS membership changes
Patch by Josh McKenzie and Sam Tunnicliffe; reviewed by Marcus Ericksson for
CASSANDRA-20467

Co-authored-by: Josh McKenzie <jmckenzie@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2025-03-26 10:34:34 +00:00
Sam Tunnicliffe 73cd2c56ca Add histogram columns to timer metrics vtable
Patch by Sam Tunnicliffe; reviewed by Maxim Muzafarov for
CASSANDRA-20466
2025-03-24 12:01:09 +00:00
David Capwell ea4ff0e966 Expand TableWalk tests to include collections and add support for += and -= for these types
patch by David Capwell; reviewed by Abe Ratnofsky for CASSANDRA-20460
2025-03-21 11:45:33 -07:00
Stefan Miklosovic 02d71cee45
Add support for time, date, timestamp types in scalar constraint
patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20274
2025-03-20 21:03:55 +01:00
Caleb Rackliffe 9b59f8eb09 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Serialization can lose complex deletions in a mutation with multiple collections in a row
2025-03-19 12:35:21 -05:00
Caleb Rackliffe 1d47fab638 Serialization can lose complex deletions in a mutation with multiple collections in a row
patch by Caleb Rackliffe; reviewed by Berenguer Blasi and Abe Ratnofsky for CASSANDRA-20449
2025-03-19 12:21:47 -05:00
David Capwell 779bae02c8 Add LIMIT and PER PARTITION LIMIT to the AST SingleNodeTableWalkTest
patch by David Capwell; reviewed by Abe Ratnofsky for CASSANDRA-20399
2025-03-17 14:07:00 -07:00
Andy Tolbert 19007f374c
Remove remaining driver dependencies from server code
patch by Andy Tolbert; reviewed by Stefan Miklosovic for CASSANDRA-20327
2025-03-17 21:55:38 +01:00
Jordan West 35d51725ef Add read ahead buffer for scans of compressed data files
Patch by Jordan West, Jon Haddad; Reviewed by David Capwell, Caleb Rackliffe, Dmitry Konstantinov for CASSANDRA-15452

NOTE: This was originally merged up via merge commit but something went wrong, this is the fix commit to bring this back to trunk
2025-03-17 11:13:19 -07:00
Stefan Miklosovic fcc1f25ba2
Merge branch 'cassandra-5.0' into trunk 2025-03-17 18:43:43 +01:00
Tiago Alves c925228a4d
Improve error messages when initializing auth classes
patch by Tiago Alves; reviewed by Stefan Miklosovic, Maxwell Guo for CASSANDRA-20368
2025-03-17 18:37:50 +01:00
Stefan Miklosovic 84b6f316e8
Merge branch 'cassandra-5.0' into trunk 2025-03-17 09:15:15 +01:00
Stefan Miklosovic 9e04c7a789
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-03-17 09:14:16 +01:00
Stefan Miklosovic dff453350a
Optionally skip exception logging on invalid legacy protocol magic exception
patch by Stefan Miklosovic; reviewed by David Capwell, Brad Schoening for CASSANDRA-19483
2025-03-17 09:12:21 +01:00
Bernardo Botella Corbi ca04d67720 Fix constraints package name typo
patch by Bernardo Botella; reviewed by Sam Tunnicliffe for CASSANDRA-20438
2025-03-14 11:30:52 -07:00
Ariel Weisberg bac5548fbc Merge branch 'cassandra-5.0' into trunk 2025-03-14 14:06:05 -04:00
Ariel Weisberg b17e4ee88a Fix SSTableReader interval mock in UnifiedCompactionStrategyTest
patch by Ariel Weisberg; reviewed by Caleb Rackliffe for CASSANDRA-20437
2025-03-14 14:04:59 -04:00
Stefan Miklosovic 85b25f2256
Add regular expression constraint
patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20275
2025-03-14 17:13:00 +01:00
Bernardo Botella Corbi acaff7bf44 Fix the constraints mutability on ColumnMetadata
patch by Bernardo Botella; reviewed by Sam Tunnicliffe for CASSANDRA-20357
2025-03-13 13:49:17 -07:00
Caleb Rackliffe 7b15f477f9 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Prioritize legacy 2i over SAI for columns with multiple indexes
2025-03-13 12:21:09 -05:00
Caleb Rackliffe 740d6d0805 Prioritize legacy 2i over SAI for columns with multiple indexes
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20334
2025-03-13 12:15:25 -05:00
Dmitry Konstantinov 771ae67223 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Disable role and network permission caches to avoid interference between test methods
2025-03-13 14:37:09 +00:00
Dmitry Konstantinov c4eb9a3aad Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
2025-03-13 14:24:48 +00:00
Dmitry Konstantinov f711292902 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Disable role and network permission caches to avoid interference between test methods
2025-03-13 14:15:33 +00:00
Dmitry Konstantinov 8cb58bf97a Disable role and network permission caches to avoid interference between test methods
Patch by Dmitry Konstantinov; reviewed by TBD for CASSANDRA-20423
2025-03-13 13:37:20 +00:00
Stefan Miklosovic 4dd70cec76
Un-ignore HintsUpgradeTest
patch by Stefan Miklosovic; reviewed by Alex Petrov for CASSANDRA-20435
2025-03-13 14:21:20 +01:00
maoling 7c0a86323e
Add JVM version and Cassandra build date to nodetool version -v
patch by Ling Mao; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-19721
2025-03-12 11:48:36 +01:00
Stefan Miklosovic 5c845f3b09
Move all disk error logic to DiskErrorsHandler to enable pluggability
patch by Stefan Miklosovic; reviewed by Tommy Stendahl, Brandon Williams for CASSANDRA-20363
2025-03-11 22:06:49 +01:00
maoling 31ee3a795b
Make more unit tests generate test-related files in the temporary directory
patch by Ling Mao; reviewed by Isaac Reath, Paulo Motta, Stefan Miklosovic for CASSANDRA-19672
2025-03-10 17:23:06 +01:00
Caleb Rackliffe df96494801 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Support null column value tombstones in FQL batch statements
2025-03-06 11:23:07 -06:00
Caleb Rackliffe aee3c7531b Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Support null column value tombstones in FQL batch statements
2025-03-06 11:16:57 -06:00
Caleb Rackliffe 985e121404 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Support null column value tombstones in FQL batch statements
2025-03-06 11:09:01 -06:00
Caleb Rackliffe f375a3914f Support null column value tombstones in FQL batch statements
patch by Caleb Rackliffe; reviewed by Abe Ratnofsky for CASSANDRA-20397
2025-03-06 10:56:49 -06:00
Stefan Miklosovic cc63d3cd83
Merge branch 'cassandra-5.0' into trunk 2025-03-06 14:31:05 +01:00
Stefan Miklosovic 4f382d93f5
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-03-06 14:27:06 +01:00
Stefan Miklosovic 16bca9d343
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-03-06 14:23:11 +01:00
Stefan Miklosovic ef354d0d5e
Update Zstd library to 1.5.7-1
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-20367
2025-03-06 14:19:01 +01:00
Jordan West a09d5240ab Add read ahead buffer for scans of compressed data files
Patch by Jordan West, Jon Haddad; Reviewed by David Capwell, Caleb Rackliffe, Dmitry Konstantinov for CASSANDRA-15452
2025-03-05 15:37:07 -08:00
Bernardo Botella Corbi 58b7ebfa4b Add OCTET_LENGTH constraint
patch by Bernardo Botella; reviewed by Stefan Miklosovic for CASSANDRA-20340
2025-03-05 10:12:52 -08:00
Ariel Weisberg fa3542da9c Merge branch 'cassandra-5.0' into trunk 2025-03-04 18:58:44 -05:00
Ariel Weisberg 4edf79a263 Ninja add missing license to IntervalTreeTest 2025-03-04 18:58:16 -05:00
Ariel Weisberg 0d0a2b6d28 Merge branch 'cassandra-5.0' into trunk 2025-03-04 17:11:52 -05:00
Ariel Weisberg 20562d10a0 Improve IntervalTree build throughput
patch by Ariel Weisberg; reviewed by Marcus Eriksson for CASSANDRA-19596
2025-03-04 17:10:43 -05:00
Dmitry Konstantinov eed4fbc8f7 Reduce heap memory allocations in different places along the hot write path
Avoid iterator allocations if possible
Handle typical cases (such as a single row, single table writes) more efficiently
Add fast paths for typical scenarios (like absense of views and triggers)
Memorize things which can be computed once

Patch by Dmitry Konstantinov; reviewed by Chris Lohfink, Michael Semb Wever, Vladimir Sitnikov for CASSANDRA-20167
2025-03-04 22:33:14 +03:00
maulin-vasavada 37fe4b679c
Provide keystore_password_file and truststore_password_file options to read credentials from a file
patch by Maulin Vasavada; reviewed by Stefan Miklosovic, Maxwell Guo for CASSANDRA-13428
2025-03-04 12:33:41 +01:00
Marcus Eriksson ca227d82ba Unregistering a node should also remove it from tokenMap if it is there and recalculate the placements
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20346
2025-03-03 08:49:05 +01:00
Marcus Eriksson 369daf56bc Fix PartitionUpdate.isEmpty deserialization issue to avoid potential EOFException
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20345
2025-03-03 08:46:11 +01:00
Marcus Eriksson 417bb21d2e Avoid adding LEFT nodes to tokenMap on upgrade from gossip
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20344
2025-03-03 08:46:06 +01:00
Marcus Eriksson 2bc24da841 Allow empty placements when deserializing cluster metadata
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20343
2025-03-03 08:39:32 +01:00
Marcus Eriksson 415eaffb9c Reduce heap pressure when initializing CMS
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20267
2025-03-03 08:37:33 +01:00
Stefan Miklosovic d276dec0ad
Deduplicate constraint validation logic for supported types
patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20371
2025-02-28 13:56:56 +01:00
Abe Ratnofsky a80663de61 Fix NoSuchElementException on dropped keyspace during Paxos cleanup
patch by Abe Ratnofsky; reviewed by Francisco Guerrero, Sam Tunnicliffe for CASSANDRA-20320
2025-02-27 14:37:16 -08:00
Caleb Rackliffe f81ece5cd0 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid limit on RFP fetch in the case of an unresolved static row
2025-02-26 17:51:23 -06:00
Caleb Rackliffe 5483165938 Avoid limit on RFP fetch in the case of an unresolved static row
patch by Caleb Rackliffe; reviewed by David Capwell and Zhao Yang for CASSANDRA-20323
2025-02-26 17:41:15 -06:00
Stefan Miklosovic a51344c611
Add JSON constraint
patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20273
2025-02-26 16:08:13 +01:00
Stefan Miklosovic 980047657d
Prevent invalid constraint combinations
patch by Stefan Miklosovic; reviewed by Bernardo Botella for CASSANDRA-20330
2025-02-26 15:49:15 +01:00
Maxwell Guo 989f0414b7 Support CREATE TABLE LIKE with INDEXES
patch by Maxwell Guo; reviewed by Stefan Miklosovic, Sam Tunnicliffe for CASSANDRA-19965
2025-02-26 16:14:43 +08:00
Stefan Miklosovic ffdc4b79a4
Merge branch 'cassandra-5.0' into trunk 2025-02-25 09:43:23 +01:00
Stefan Miklosovic 378c93de90
Include materialized views to the output of DESCRIBE TABLE statements
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20365
2025-02-25 09:39:44 +01:00
Dmitry Konstantinov 2daa0f0ba0 Fix flaky ReadSpeculationTest: with TCM the second replica in a read plan can be different, it depends on an order of adding nodes to a cluster.
To fix it NetworkTopologyProximity implementation is adjusted using ByteBuddy to make a predictable order of nodes to read (the same idea as in python read repair dtests is used). Also, dynamic snitch is disabled to avoid re-ordering of replicas in a read plan by it. Logging of actual configuration in java dtests is added to simplify troubleshooting (the default logic does not print it because logging is initialized in tests later).

Patch by Dmitry Konstantinov; reviewed by Brandon Williams,Stefan Miklosovic for CASSANDRA-20251
2025-02-23 10:01:16 +03:00
Sam Tunnicliffe 1a6b8e0628 Invalidate affected prepared stmts on every table metadata change
Where MVs are also affected by a table alteration make sure we correctly
set the epoch of the TableMetadata enclosed in the ViewMetadata

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

Co-authored-by: Sam Tunnicliffe <samt@apache.org>
Co-authored-by: Marcus Eriksson <marcuse@apache.org>
2025-02-20 15:12:47 +00:00
Bernardo Botella Corbi 95180bab15 Adds new size Guardrails
Patch by Bernardo Botella Corbi; Reviewed by Jordan West, Yifan Cai for CASSANDRA-19677
2025-02-17 12:28:55 -08:00
Marcus Eriksson ebbdd8bb81 Make it possible to abort all kinds of multi step operations
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20217
2025-02-17 13:14:50 +01:00
Stefan Miklosovic f2c6ee24ed
Do not leak non-Java exceptions when calling snapshot operations via JMX
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-20335
2025-02-17 09:14:42 +01:00
Stefan Miklosovic 1630ef2cec
Implement NOT_NULL constraint
patch by Stefan Miklosovic; reviewed by Bernardo Botella, Dinesh Joshi for CASSANDRA-20276

Co-authored-by: Bernardo Botella <bernardo.botella@apple.com>
2025-02-17 09:06:33 +01:00
Caleb Rackliffe e0c7d7b938 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid fetching entire partitions on unresolved static rows in RFP when no static column predicates exist
2025-02-12 17:37:52 -06:00
Caleb Rackliffe bd99331bf2 Avoid fetching entire partitions on unresolved static rows in RFP when no static column predicates exist
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20243
2025-02-12 17:29:22 -06:00
Bereng 0e41c80c81 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Long running repairs autofail prematurely
2025-02-12 11:16:37 +01:00
Bereng 026f73eacb Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Long running repairs autofail prematurely
2025-02-12 11:14:49 +01:00
Bereng fc232f45f0 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Long running repairs autofail prematurely
2025-02-12 11:12:53 +01:00
Bereng 914046ae46 Long running repairs autofail prematurely
patch by Berenguer Blasi; reviewed by Bernardo Botella Corbi, Michael Semb Wever for CASSANDRA-20312
2025-02-12 11:09:14 +01:00
David Capwell c1d32e04da To improve accord interoperability test coverage, need to extend the harry model domain to handle more possible CQL states
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20156
2025-02-11 18:21:43 -08:00
Caleb Rackliffe d77ac1a325 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid indexing empty values for non-literals and types that do not allow them
2025-02-11 15:16:17 -06:00
Caleb Rackliffe f28a16740a Avoid indexing empty values for non-literals and types that do not allow them
patch by Caleb Rackliffe; reviewed by David Capwell and Andres de la Peña for CASSANDRA-20313

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Andres de la Peña <a.penya.garcia@gmail.com>
2025-02-11 14:49:53 -06:00
Stefan Miklosovic 511bd20314
Merge branch 'cassandra-5.0' into trunk 2025-02-07 23:29:19 +01:00
Stefan Miklosovic 881a1f023f
Fix incorrect results of min / max in-built functions on clustering columns in descending order
Not unwrapping returnType has consequences of not
returning the correct results when using aggregate in-built functions
(max / min) on clustering columns having descending order.

The safest solution, is to unwrap returnType "at source"
and work with unwrapped type only since then.

patch by Stefan Miklosovic; reviewed by David Capwell for CASSANDRA-20295
2025-02-07 23:18:40 +01:00
Brandon Williams e703d0709d Merge branch 'cassandra-5.0' into trunk 2025-02-07 15:37:34 -06:00
Dmitry Konstantinov 11480a8b08 Wait for completion of async dumpMemtable in CommitLogTestCQL
Patch by Dmitry Konstantinov; reviewed by brandonwilliams and
smiklosovic for CASSANDRA-20298
2025-02-07 15:36:48 -06:00
Bernardo Botella Corbi 08ddb01dd3
Improve error messages for constraints
patch by Bernardo Botella; reviewed by Stefan Miklosovic, Dinesh Joshi for CASSANDRA-20266
2025-02-07 09:14:47 +01:00
Caleb Rackliffe 4a80daf32e Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid possible consistency violations for SAI intersection queries over repaired index matches and multiple non-indexed column matches
2025-02-06 13:58:45 -06:00
Caleb Rackliffe 953ab6cf64 Avoid possible consistency violations for SAI intersection queries over repaired index matches and multiple non-indexed column matches
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20189
2025-02-06 13:32:39 -06:00
Sam Tunnicliffe 066c489d76 Tighten up permissions on system keyspaces
* Restrict which permissions can be granted on system keyspaces
* Ensure that GRANT... ON ALL KEYSPACES excludes system keyspaces
* Add system_traces to the always readable set

Patch by Sam Tunnicliffe and Francisco Guerrero; reviewed by Sam
Tunnicliffe and Francisco Guerrero for CASSANDRA-20090

Note: this is a re-application of the commit to cassandra-4.0 only,
to fix a bad merge the first time around.

Co-authored-by: Francisco Guerrero <frankgh@apache.org>
2025-02-06 09:13:03 +00:00
Chris Lohfink 69dc5d05ef
Add system_views.partition_key_statistics for querying SSTable metadata
patch by Chris Lohfink; reviewed by David Capwell, Stefan Miklosovic for CASSANDRA-20161
2025-02-05 12:49:31 +01:00
Caleb Rackliffe 254e1402b4 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid under-skipping during intersections when an iterator has mixed STATIC and WIDE keys
2025-02-03 16:11:01 -06:00
Caleb Rackliffe a118a704cb Avoid under-skipping during intersections when an iterator has mixed STATIC and WIDE keys
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20258
2025-02-03 16:02:43 -06:00
Josh McKenzie 501fbf7624 Merge branch 'cassandra-5.0' into trunk 2025-02-03 11:03:48 -05:00
Josh McKenzie a9f2c7f4ba Merge branch 'cassandra-4.1' into cassandra-5.0
# Conflicts:
#	CHANGES.txt
2025-02-03 11:00:11 -05:00
Dmitry Konstantinov 68b7425332 WaitQueue.Signal.awaitUninterruptibly may block forever if invoking thread is interrupted
Patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith and Josh McKenzie for CASSANDRA-20084
2025-02-03 10:58:56 -05:00
Bernardo Botella Corbi 5cbf993d96
CEP-42 - Add Constraints Framework
patch by Bernardo Botella; reviewed by Yifan Cai, Stefan Miklosovic, Josh McKenzie, Maxwell Guo, Dmitry Konstantinov, Sam Tunnicliffe for CASSANDRA-19947
2025-01-31 10:49:11 +01:00
David Capwell 10c0481f46 Forward port randomized testing improvements from cep-15-accord to trunk
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20253
2025-01-28 12:46:50 -08:00
Caleb Rackliffe 8e5bdc6d4b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Correct the default behavior of compareTo() when comparing WIDE and STATIC PrimaryKeys
2025-01-27 15:22:58 -06:00
Dmitry Konstantinov d7258ac8f3
Add table metric PurgeableTombstoneScannedHistogram and a tracing event for scanned purgeable tombstones
patch by Dmitry Konstantinov; reviewed by Chris Lohfink, Stefan Miklosovic for CASSANDRA-20132
2025-01-27 22:10:20 +01:00
Caleb Rackliffe 225eb2feeb Correct the default behavior of compareTo() when comparing WIDE and STATIC PrimaryKeys
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20238
2025-01-27 15:05:44 -06:00
Marcus Eriksson 634a5985d3 Make sure we can parse the expanded CQL before writing it to the log or sending it to replicas
Patch by marcuse; reviewed by Sam Tunnicliffe and Stefan Miklosovic for CASSANDRA-20218
2025-01-27 10:47:15 +01:00
Stefan Miklosovic cf2bca244e
Merge branch 'cassandra-5.0' into trunk 2025-01-27 08:34:13 +01:00
Stefan Miklosovic 0d420a0df4
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-01-27 08:26:53 +01:00
Stefan Miklosovic 85647ceadb
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-01-27 08:23:35 +01:00
Stefan Miklosovic 6207a305ba
Tighten up permissions in dc authorizers
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-20225
2025-01-26 17:52:09 +01:00
David Capwell 186b5e4dbe Merge branch 'cassandra-5.0' into trunk 2025-01-24 15:02:11 -08:00
David Capwell 975c309eee Merge branch 'cassandra-4.1' into cassandra-5.0 2025-01-24 15:00:52 -08:00
David Capwell 935effb7e0 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-01-24 14:59:34 -08:00
David Capwell 3ddccf4521 CBUtil serialization of UTF8 does not handle all UTF8 properly
patch by David Capwell; reviewed by Yifan Cai for CASSANDRA-20234
2025-01-24 14:56:44 -08:00
Alex Petrov 1f17ef3b5c Fix ConsistentBootstrapTest
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-20239
2025-01-24 12:10:06 +01:00
Stefan Miklosovic ba4a0d4fcb
Add format_bytes and format_time functions
patch by Stefan Miklosovic; reviewed by Jordan West for CASSANDRA-19546

Co-authored-by: Cheng Wang <chengw@netflix.com>
2025-01-24 09:47:12 +01:00
Stefan Miklosovic 06f0965a08
Fix error when trying to assign a tuple to target type not being a tuple
patch by Stefan Miklosovic; reviewed by David Capwell for CASSANDRA-20237
2025-01-24 01:34:23 +01:00
Maxwell Guo b4bcdfa785
Fail CREATE TABLE LIKE statement if UDTs in target keyspace do not exist or they have different structure from ones in source keyspace
patch by Maxwell Guo; reviewed by Stefan Miklosovic, Benjamin Lerer for CASSANDRA-19966
2025-01-22 18:53:53 +01:00
Joseph Lynch 0d39ea4917
Support octet_length and length functions
Previously users would either have to read the data and check the length
themselves or enable UDF and register UDFs to check the length of
columns. This patch adds a subset of the SQL99 (binary) string
functions: "octet_length" defined on all types and "length" defined on
UTF8 strings.

patch by Joey Lynch; reviewed by Chris Lohfink and Jordan West for CASSANDRA-20102
2025-01-22 11:59:23 +01:00
Stefan Miklosovic a8702d6a44
Merge branch 'cassandra-5.0' into trunk 2025-01-22 01:11:26 +01:00
Marcus Eriksson 751d3f24cf
Make sure we can set parameters when configuring CassandraCIDRAuthorizer
patch by Marcus Eriksson; reviewed by Stefan Miklosovic for CASSANDRA-20220
2025-01-22 01:08:14 +01:00
Blake Eggleston 15d6437283 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Use mutation creation time for hint expiry rather than hint submission time
2025-01-21 12:16:05 -08:00
Blake Eggleston 0cc7a03523 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Use mutation creation time for hint expiry rather than hint submission time
2025-01-21 12:13:37 -08:00
Blake Eggleston 246e65e69c Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Use mutation creation time for hint expiry rather than hint submission time
2025-01-21 12:10:53 -08:00
Matt Byrd 4f0ad22f12 Use mutation creation time for hint expiry rather than hint submission time
patch by Matt Byrd; reviewed by Chris Lohfink, reviewed by Blake Eggleston for CASSANDRA-20014
2025-01-21 12:05:00 -08:00
Caleb Rackliffe cc86fc8865 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add selected SAI index state and query performance metrics to nodetool tablestats
2025-01-17 12:32:49 -06:00
Sunil Ramchandra Pawar 79630fb42a Add selected SAI index state and query performance metrics to nodetool tablestats
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe, Matt Byrd, and Maxim Muzafarov for CASSANDRA-20026
2025-01-17 12:24:27 -06:00
Sam Tunnicliffe a397a53891 Merge branch 'cassandra-5.0' into trunk 2025-01-17 09:12:01 +00:00
Sam Tunnicliffe 217490bdd8 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-01-17 09:09:56 +00:00
Sam Tunnicliffe d14d16926e Merge branch 'cassandra-4.0' into cassandra-4.1 2025-01-17 09:08:09 +00:00
Stefan Miklosovic 6e8d0cde9e
Make JsonUtils serialize Instant always with the same format
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-20209
2025-01-17 09:23:07 +01:00
Caleb Rackliffe 2a3454a3ea Port Harry v2 to trunk
This commit ports to trunk work already done in the cep-15-accord branch, including parts of CASSANDRA-19955, CASSANDRA-20080, and CASSANDRA-20143.

patch by Caleb Rackliffe; reviewed by David Capwell and Alex Petrov for CASSANDRA-20200

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Ariel Weisberg <aweisberg@apple.com>
Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
2025-01-16 14:48:00 -06:00
Brandon Williams b575d13610 Merge branch 'cassandra-5.0' into trunk 2025-01-16 13:54:21 -06:00
Brandon Williams ba73f7ce34 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-01-16 13:54:12 -06:00
Brandon Williams 18c777f641 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-01-16 13:53:59 -06:00
Kristijonas Zalys 7ffbd714b4 Set setIsShutdownUnsafeForTests(true) in dtests to fix shutdown race condition
Patch by Kristijonas Zalys, reviewed by brandonwilliams and mck for
CASSANDRA-18440
2025-01-16 13:52:51 -06:00
Stefan Miklosovic 407dbacb0a
Enable filtering of snapshots on keyspace, table and snapshot name in nodetool listsnapshots
patch by Stefan Miklosovic; reviewed by Jordan West, Bernardo Botella, Cheng Wang, Maxim Muzafarov for CASSANDRA-20151
2025-01-16 09:59:47 +01:00
Stefan Miklosovic b4e9399865
Create manifest upon loading where it does not exist or enrich it
When snapshot manifest does not exist, no snapshots would be found, because even
they would be loaded, since CASSANDRA-18111, snapshot's presence is logically
determined by the existence of at least one manifest.json file in any data dir. That
would result in snapshots not being shown e.g. in the output of
nodetool listsnapshots.

The fix consists of creating a manifest in each snapshot directory when not present.

When a manifest.json exists, its older format has not contained created_at field (pre-16789)
When this is detected, we will proceed to enrich such manifest by overwriting it
with a manifest of new format.

patch by Stefan Miklosovic; reviewed by Jordan West, Cheng Wang, Bernardo Botella for CASSANDRA-20150
2025-01-16 09:59:42 +01:00
Stefan Miklosovic b15a1f04b6
Propagate true size of snapshot in SnapshotDetailsTabularData to not call JMX twice in nodetool listsnapshots
This patch also opportunistically adds a new MBean method for SnapshotManager to
return true snapshot size for a particular snapshot.

patch by Stefan Miklosovic; reviewed by Maxim Muzafarov, Bernardo Botella for CASSANDRA-20149
2025-01-15 19:40:44 +01:00
Maxwell Guo 46ef00a315
Implementation of CEP-43
patch by Maxwell Guo; reviewed by Stefan Miklosovic, Benjamin Lerer for CASSANDRA-19964
2025-01-14 21:47:11 +01:00
Abe Ratnofsky aa5b8e3d3f Periodically disconnect roles that are revoked or have LOGIN=FALSE set
patch by Abe Ratnofsky; reviewed by Bernardo Botella Corbi, Francisco Guerrero Hernandez, and Jon Meredith for CASSANDRA-19385
2025-01-14 12:40:44 -08:00
Caleb Rackliffe 3c1e10b74e AST library for CQL-based fuzz tests
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20198

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
2025-01-14 12:14:23 -06:00
Sam Tunnicliffe d8babd0191 Merge branch 'cassandra-5.0' into trunk 2025-01-13 09:53:59 +00:00
Sam Tunnicliffe 332341b9b6 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-01-13 09:50:38 +00:00
Dmitry Konstantinov 6f90e962f5 Enforce CQL message size limit on multiframe messages
Patch by Dmitry Konstantinov; reviewed by Sam Tunnicliffe,
Caleb Rackliffe for CASSANDRA-20052
2025-01-13 09:47:37 +00:00
Caleb Rackliffe e415019f64 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Remove v30 and v3X from 5.x in-JVM upgrade tests
2025-01-10 13:22:31 -06:00
Caleb Rackliffe 184887069f Remove v30 and v3X from 5.x in-JVM upgrade tests
patch by Caleb Rackliffe; reviewed by Mick Semb Wever and Brandon Williams for CASSANDRA-20103
2025-01-10 13:13:12 -06:00
Brandon Williams 6c17ab15d6 Merge branch 'cassandra-5.0' into trunk 2025-01-08 13:41:04 -06:00
Brandon Williams 02755193f9 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-01-08 13:40:55 -06:00
Brandon Williams 0edd63287b Merge branch 'cassandra-4.0' into cassandra-4.1 2025-01-08 13:40:41 -06:00
Brandon Williams b074675c37 Add in-jvm dtest for durable writes
Patch by brandonwilliams; reviewed by smiklosovic for CASSANDRA-19601
2025-01-08 13:40:02 -06:00
David Capwell 6843514597 Merge branch 'cassandra-5.0' into trunk 2025-01-07 17:47:27 -08:00
David Capwell 8125a69480 Merge branch 'cassandra-4.1' into cassandra-5.0 2025-01-07 17:45:52 -08:00
David Capwell 4da92af589 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-01-07 17:40:39 -08:00
Sunil Ramchandra Pawar 4fc8bb29fc IndexOutOfBoundsException when accessing partition where the column was deleted
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-20108
2025-01-07 17:38:20 -08:00
mck d22a948fff
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid memory allocation in NativeCell.valueSize() and NativeClustering.dataSize()
2025-01-04 21:57:34 +01:00
Dmitry Konstantinov 4ae1aee39b
Avoid memory allocation in NativeCell.valueSize() and NativeClustering.dataSize()
patch by Dmitry Konstantinov; reviewed by Branimir Lambov, Mick Semb Wever for CASSANDRA-20162
2025-01-04 21:55:31 +01:00
Abe Ratnofsky c853efffa8 Support audit logging for JMX operations
Patch by Abe Ratnofsky; reviewed by Bernardo Botella, Doug Rohrer, Francisco Guerrero for CASSANDRA-20128
2025-01-02 09:15:59 -08:00
Sam Tunnicliffe a98cb15476 Handle partitioned nodes in DiscoverySimulationTest
Patch by Sam Tunnicliffe; reviewed by Brandon Williams for CASSANDRA-19505
2024-12-18 12:54:56 +00:00
manish-m-pillai 22af7a74cc
Enable sorting of nodetool status output
patch by Manish Pillai; reviwed by Stefan Miklosovic, Bernardo Botella, Jordan West for CASSANDRA-20104

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2024-12-17 20:30:14 +01:00
Stefan Miklosovic 75ec1ada7a
Check presence of a snapshot in a case-insensitive manner on macOS platform to prevent hardlinking failures
When hardlinks are created for a snapshot with the name "snapshot"
and then we take a snapshot with the name "Snapshot", macOS platform thinks
that this was already hardlinked because its hardlinking implementation
does not seem to be case-sensitive. The fix consists of checking,
in a case-insensitive manner, if there is already such snapshot,
but only on macOS platform.

The patch also does not create empty directories for a given snapshot
prematurely before checking its presence so there are not dangling empty
directories in case of a failure.

patch by Stefan Miklosovic; reviewed by Bernardo Botella, Caleb Rackliffe for CASSANDRA-20146
2024-12-17 09:38:18 +01:00
Stefan Miklosovic 849245a562
Remove cassandra.jmx.remote.port setting to an empty string in SimulatorRunner
patch by Stefan Miklosovic; reviewed by Sam Tunnicliffe for CASSANDRA-11695
2024-12-16 17:50:29 +01:00
Sam Tunnicliffe 48dcf5e092 Snitch re-implementation
Deprecate IEndpointSnitch entirely, to be replaced with new interfaces:
* Locator for endpoint -> location mapping
* InitialLocationProvider to supply the DC & rack for registration
* NodeProximity for sorting endpoints and replicas at query time

For migration/upgrade/deprecation, nodes can still be configured with
an IEndpointSnitch implementation via endpoint_snitch in config, but
we hide this with a facade and only present the new interfaces.

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

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2024-12-16 11:25:39 +00:00
Zhongxiang Zheng 2ff41551a6
Enable JMX server configuration to be in cassandra.yaml
patch by Zhongxiang Zheng; reviewed by Stefan Miklosovic, Maulin Vasavada, Cheng Wang, Jordan West for CASSANDRA-11695

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2024-12-16 11:01:29 +01:00
Branimir Lambov 54e4688069 Parallelized UCS compactions
patch by Branimir Lambov, reviewed by Sylvain Lebresne for CASSANDRA-18802
2024-12-11 17:37:09 +02:00
Marcus Eriksson 61fe1f0bf9 Merge branch 'cassandra-5.0' into trunk 2024-12-11 10:32:04 +01:00
Marcus Eriksson f9ab5cf797 Add flag to avoid invalidating key cache on sstable deletions
Patch by marcuse; reviewed by Caleb Rackliffe for CASSANDRA-20068
2024-12-11 10:27:11 +01:00
Marcus Eriksson 9bf1680b1f Avoid prepared statement invalidation race when committing schema changes
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20116
2024-12-11 10:10:32 +01:00
Stefan Miklosovic f410b0fa0b
Consolidate all snapshot management to SnapshotManager
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-18111
2024-12-11 02:51:29 +01:00
Caleb Rackliffe 86868c6df8 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Interpret inet, bigint, varint, and decimal as non-reversed types for query construction and post-filtering
2024-12-09 15:11:40 -06:00
Caleb Rackliffe 2651623af6 Interpret inet, bigint, varint, and decimal as non-reversed types for query construction and post-filtering
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20100
2024-12-09 15:06:02 -06:00
Ekaterina Dimitrova bc40d3bb27 Fix RequestFailureReason constants codes
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe and Stefan Miklosovic  for CASSANDRA-20126
2024-12-05 15:31:46 -05:00
Branimir Lambov 3078aea1cf Introduce SSTableSimpleScanner for compaction
This removes the usage of index files during compaction and simplifies
and improves the performance of compaction.

patch by Branimir Lambov; reviewed by Sylvain Lebresne for CASSANDRA-20092
2024-12-04 10:12:39 +02:00
Sam Tunnicliffe 880fa6587b Include column drop timestamp in ALTER TABLE transformation
Patch by Sam Tunnicliffe and Marcus Eriksson; reviewed by Sam
Tunnicliffe and Marcus Eriksson for CASSANDRA-18961

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2024-11-27 10:33:22 +00:00
Maulin Vasavada 9131be9fa5
Make JMX SSL configurable in cassandra.yaml
patch by Maulin Vasavada; reviewed by Stefan Miklosovic, Doug Rohrer for CASSANDRA-18508
2024-11-23 10:40:13 +01:00
Yifan Cai 8b126e97bb Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Enhance CQLSSTableWriter to notify client on sstable production
2024-11-22 15:01:00 -08:00
Yifan Cai 1655578ae8 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Enhance CQLSSTableWriter to notify client on sstable production
2024-11-22 14:59:16 -08:00
Yifan Cai c44008e9e4 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Enhance CQLSSTableWriter to notify client on sstable production
2024-11-22 14:57:36 -08:00