cassandra/test
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
..
anttasks/org/apache/cassandra/anttasks Optionally fail writes when SAI refuses to index a term value exceeding a configured maximum size 2024-04-17 11:12:42 -05:00
bin JMH improvements - faster build and async profiler 2023-09-25 12:39:36 +02:00
burn/org/apache/cassandra Merge branch 'cassandra-5.0' into trunk 2024-09-16 12:26:12 -05:00
conf Redesign progress mechanisms to be memory efficient, use fewer messages and to resolve dependency chains promptly. 2025-04-17 11:59:51 -07:00
data Accord/non-Accord interoperability and support for live migration 2025-04-17 11:59:49 -07:00
distributed/org/apache/cassandra Redesign progress mechanisms to be memory efficient, use fewer messages and to resolve dependency chains promptly. 2025-04-17 11:59:51 -07:00
harry/main/org/apache/cassandra/harry CEP-15 (C*): Messaging and storage engine integration 2025-04-17 11:59:47 -07:00
long/org/apache/cassandra Accord/non-Accord interoperability and support for live migration 2025-04-17 11:59:49 -07:00
memory/org/apache/cassandra/db/compaction Explicitly localize strings to Locale.US for internal implementation 2024-10-29 08:58:01 +01:00
microbench/org/apache/cassandra/test/microbench Accord/non-Accord interoperability and support for live migration 2025-04-17 11:59:49 -07:00
resources Enable JMX server configuration to be in cassandra.yaml 2024-12-16 11:01:29 +01:00
simulator Accord migration and interop correctness 2025-04-17 11:59:51 -07:00
unit Redesign progress mechanisms to be memory efficient, use fewer messages and to resolve dependency chains promptly. 2025-04-17 11:59:51 -07:00