Commit Graph

31035 Commits

Author SHA1 Message Date
David Capwell 6265ce5187 Ninja fix: RandomSource.asJdkRandom did not provide a seed. This should have been fixed in CASSANDRA-19847 as it was fixed on Cassadnra trunk 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
Blake Eggleston 0f51ee407b CEP-15: C* - Early repair failures hang nodetool
Patch by Blake Eggleston; Reviewed by Ariel Weisberg for CASSANDRA-19834
2025-04-17 11:59:51 -07:00
Blake Eggleston 058640be4e CEP-15 (C*) increase message timeouts for range barrier messages
Patch by Blake Eggleston; Reviewed by Ariel Weisberg for CASSANDRA-19926
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
Alex Petrov 1866b8ec73 Fix Journal segment allocation/switch race condition
Patch by Alex Petrov; reviewed by Aleksey Yeschenko for CASSANDRA-19866
2025-04-17 11:59:51 -07:00
Alex Petrov 00ebcdc9f2 Fix a problem with static segments being opened with an empty offset after switch unless active segments offset file was closed
Patch by Alex Petrov; reviewed by Aleksey Yeschenko for CASSANDRA-19867
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 788caeeef3 Switch to infinite loop executor instead of a while-loop thread.
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-19864
2025-04-17 11:59:51 -07:00
Alex Petrov 66c50d796a Revert acccord module to absolute path 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
Ariel Weisberg 3dfd80ff78 ApplyThenWaitUntilApplied supplies wrong epoch for executeAtEpoch
Patch by Ariel Weisberg; Reviewed by Benedict Elliott Smith for CASSANDRA-19687
2025-04-17 11:59:50 -07:00
Blake Eggleston d6bf8ec3d0 Don't run incremental repairs for consensus only repairs
Patch by Blake Eggleston; reviewed by David Capwell for CASSANDRA-19717
2025-04-17 11:59:50 -07:00
Blake Eggleston 17c186ad64 Move burn test read timestamp validation from replica to coordination
Patch by Blake Eggleston; reviewed by David Capwell for CASSANDRA-19288
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
Blake Eggleston c909f2d669 ninja: fix cqlsh tests 2025-04-17 11:59:50 -07:00
Alex Petrov 128f526f4a Accord Journal Determinism: PreAccept replay stability
Patch by Alex Petrov; reviewed by Aleksey Yeschenko for CASSANDRA-19664
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
ci worker 980f1963f3 Accord: NPE in RangeDeps.forEach
patch by Benedict Elliott Smith, David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-19605
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
ci worker 333c748a91 Ninja for CASSANDRA-19305: Disable EphemeralRead by default to get benchmarks stable 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 94c2ec3c96 fix MultiElementType pack/unpack accessor api 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
Ariel Weisberg 4088c68d38 Add TODO for TxnQuery using wrong cluster metadata 2025-04-17 11:59:50 -07:00