Commit Graph

9263 Commits

Author SHA1 Message Date
Michael Marshall a72dcbc86a Get SAI MemtableIndex refs before SSTableIndex refs at query time
SAI predicate search currently has a bug that could result in missing rows due to a
concurrent flush during a query. The new test created in this PR shows the point of failure.
The problem is that we get the SSTable index references before getting the Memtable index
references. Note that we do it in the correct order in the ANN OF query path, but not
in the WHERE query path.

This commit updates the QueryView object to hold references to the appropriate Memtable indexes.

It also removes the problematic search methods from MemtableIndexManager to prevent future misuse.

patch by Michael Marshall; reviewed by Caleb Rackliffe and Ekaterina Dimitrova for CASSANDRA-20709
2025-06-16 16:00:47 -05:00
Benedict Elliott Smith 464a4f9d79 Accord Fixes:
- AccordJournal should not attempt to construct expunged commands
 - ready/notReady logic can break if we receive a partial Route that does not cover the local store
 - Invariant.require -> TopologyRetiredException
 - validate min/max in TopologyManager.preciseEpochs
Improve:
 - ExecuteSyncPoint should send Apply

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20713
2025-06-16 11:42:12 +01:00
Benedict Elliott Smith 1b78bbdc35 Fix:
- Do not query local topology when deciding what keys to fetch to avoid TopologyRetiredException
 - Ensure we propagate information back to the requesting CommandStore by using the store id to ensure it is included
 - BurnTest topology fetching was broken by earlier patch
 - Topology callbacks were not being invoked as we were not calling .begin()
 - Topology mismatch failure during notAccept phase was not being reported due to CoordinatePreAccept already having isDone==true

patch by Benedict; reviewed by David Capwell for CASSANDRA-20711
2025-06-12 11:41:59 +01:00
David Capwell 4d141e4b0a Accord: startup race condition where accord journal tries to access the 2i index before its ready
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-20686
2025-06-10 14:36:06 -07:00
Ariel Weisberg 83f58b4e1b Merge branch 'cassandra-5.0' into trunk 2025-06-10 16:33:34 -04:00
samlightfoot 53ccfd58f2 Fix MAX_SEGMENT_SIZE < chunkSize in MmappedRegions::updateState
patch by samlightfoot, Szymon Mi<C4><99><C5><BC>a<C5><82>; reviewed by Ariel Weisberg, Michael Semb Wever for CASSANDRA-20636
2025-06-10 16:32:11 -04:00
Benedict Elliott Smith 10ed20bdc3 Fixes
- Don't assume stillExecutes applies to remote request - must mark unavailable any keys we don't have the txn definition for
 - Don't exit notifyManagedPreBootstrap notify loop early, as could have later transactions with lower txnId
 - CoordinateEphemeralRead must retry if insufficient responses from replicas that still own the range
 - Burn test terminates while non-recurring tasks pending on command store queues
 - Infinite recovery due to not sending InformDurable when partially truncated
 - Incorrect participants when invoking removeRedundantDependencies
 - Infinite bootstrap loop on retired topology
Improve
 - Do not perform linear filters of CommandStores or Topologies
 - Some default implementations of forEach/iterator
 - TopologyRetiredException messages

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20707
2025-06-10 09:29:23 +01:00
samlightfoot 58ee847968 Adopt Unsafe::invokeCleaner for Direct ByteBuffer cleaning
Patch by Samuel D Lightfoot; Reviewed by Ariel Weisberg and Abe Ratnosfky for CASSANDRA-20677
2025-06-09 14:14:40 -04:00
Marcus Eriksson 7c9af51cfa Merge branch 'cassandra-5.0' into trunk 2025-06-05 14:07:44 +02:00
Marcus Eriksson f07510a303 CASSANDRA-18119 followup - test fix, create STATS component when using BtiFormat
Patch by marcuse; reviewed by Mick Semb Wever for CASSANDRA-18119
2025-06-05 14:04:42 +02:00
maoling 1261ba159c
Add additional metrics around hints
patch by Ling Mao; reviewed by Stefan Miklosovic, Maxim Muzafarov for CASSANDRA-20499

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2025-06-05 10:55:33 +02:00
Ariel Weisberg 5450a1f20e Support for add and replace in IntervalTree
Patch by Ariel Weisberg and Yuqi Yan; Reviewed by Marcus Eriksson for CASSANDRA-20513

Co-authored-by: Yuqi Yan <yukei0509@gmail.com>
2025-05-29 17:10:55 -04:00
Stefan Miklosovic 3f03dc7263
ninja: remove unused imports in AccordJournalBurnTest to pass ant checkstyle-test 2025-05-29 15:14:54 +02:00
Benedict Elliott Smith b3f035be1e Accord Fixes:
- cfk pruning+prebootstrap=invalid future dependency
 - exclude retired ranges when filtering RX stillTouches
 - propagate uses incorrect lowEpoch when fetch finds additional owned/touched ranges
 - node.withEpoch should callback with TopologyRetiredException, not throw
 - Recovery can race with durable-applied pruning; must not send durable unless latest ballot on apply
 - removeRedundantDependencies was not slicing pre-bootstrap range calculation to participating ranges
 - NPE in TopologyManager.atLeast caused by referencing an epoch that has been GC'd
 - use journal durableBeforePersister in burn test, not NOOP_PERSISTER
 - ServerUtils.cleanupDirectory use tryDeleteRecursive
 - FsyncRunnable shutdown
 - fix NPE in AccordJournalBurnTest

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20688
2025-05-29 12:52:42 +01:00
nvharikrishna 53cdefb1de Enabling single sstable uplevel by default
Patch by Venkata Harikrishna Nukala; reviewed by Marcus Eriksson and Sam
Tunnicliffe for CASSANDRA-18509
2025-05-29 10:01:36 +01:00
Caleb Rackliffe fe13726fc6 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure replica filtering protection does not trigger unnecessary short read protection reads
2025-05-28 16:53:06 -05:00
Caleb Rackliffe e5c101673a Ensure replica filtering protection does not trigger unnecessary short read protection reads
patch by Caleb Rackliffe; reviewed by Blake Eggleston and Zhao Yang for CASSANDRA-20639
2025-05-28 16:40:37 -05:00
Andy Tolbert 34650af75a Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:35:02 -05:00
Andy Tolbert e90fece187 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:29:40 -05:00
Andy Tolbert 9c308ce2f3 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Ensure prepared_statement INSERT timestamp precedes eviction DELETE
2025-05-27 22:22:41 -05:00
Andy Tolbert d077f69553 Ensure prepared_statement INSERT timestamp precedes eviction DELETE
Updates SystemKeyspace.writePreparedStatement to accept a timestamp
associated with the Prepared creation time. Using this timestamp
will ensure that an INSERT into system.prepared_statements will
always precede the timestamp for the same Prepared in
SystemKeyspace.removePreparedStatement.

This is needed because Caffeine 2.9.2 may evict an entry as soon
as it is inserted if the maximum weight of the cache is exceeded
causing the DELETE to be executed before the INSERT.

Additionally, any clusters currently experiencing a leaky
system.prepared_statements table from this bug may struggle to
bounce into a version with this fix as
SystemKeyspace.loadPreparedPreparedStatements currently does
not paginate the query to system.prepared_statements, causing heap
OOMs.  To fix this this patch adds pagination at 5000 rows and
aborts loading once the cache size is loaded. This should allow
nodes to come up and delete older prepared statements that may no
longer be used as the cache fills up (which should happen immediately).

This patch does not address the issue of Caffeine immediately evicting
a prepared statement, however it will prevent the
system.prepared_statements table from growing unbounded.  For most users
this should be adequate, as the cache should only be filled when there
are erroneously many unique prepared statements. In such a case we can
expect that clients will constantly prepare statements regardless
of whether or not the cache is evicting statements.

patch by Andy Tolbert; reviewed by Berenguer Blasi and Caleb Rackliffe for CASSANDRA-19703
2025-05-27 22:17:15 -05:00
David Capwell cfb393398f Merge branch 'cassandra-5.0' into trunk 2025-05-27 15:24:08 -07:00
Pranav Shenoy 823f48663e Unified Compaction does not properly validate min and target sizes
patch by Pranav Shenoy; reviewed by Branimir Lambov, Claude Warren, David Capwell for CASSANDRA-20398
2025-05-27 15:22:32 -07:00
Caleb Rackliffe 9c489b81a9 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Avoid lambda usage in TrieMemoryIndex range queries and ensure queue size tracking is per column
2025-05-27 15:53:30 -05:00
Caleb Rackliffe dd0d8c03b9 Avoid lambda usage in TrieMemoryIndex range queries and ensure queue size tracking is per column
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20668
2025-05-27 15:44:01 -05:00
Alex Petrov 66b973341a Accord: Retry epoch/topology metadata fetch on all peer nodes
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-20663
2025-05-23 14:35:40 +02:00
David Capwell a739e795de Merge branch 'cassandra-5.0' into trunk 2025-05-22 14:17:18 -07:00
David Capwell ac05c94e6a Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-22 14:15:37 -07:00
David Capwell 005d3c28e5 Merge branch 'cassandra-4.0' into cassandra-4.1 2025-05-22 14:14:42 -07:00
David Capwell c736d22cf8 Gossip doesn't converge due to race condition when updating EndpointStates multiple fields
patch by David Capwell, Matt Byrd; reviewed by Blake Eggleston, Brandon Williams for CASSANDRA-20659
2025-05-22 14:12:15 -07:00
Dmitry Konstantinov 063e1fe3d2 Introduce NativeAccessor to avoid new ByteBuffer allocation on flush for each NativeCell
Patch by Dmitry Konstantinov; reviewed by Branimir Lambov for CASSANDRA-20173
2025-05-21 22:16:41 +01:00
Andy Tolbert f80a234d1e Migrate sstableloader code to its own tools directory and artifact
As part of a broader effort to decouple java driver code from the
server code, this moves sstableloader to its own tools directory.

As sstableloader is also used as a library (CASSANDRA-10637), added
a new artifact 'cassandra-sstableloader' that will get deployed to
maven along with 'cassandra-all'.

While I expect this is likely a niche use case, this will allow users
to continue using BulkExport as a library.

Moves sstableloader-specific targets to its own build.xml in
tools/sstableloader/build.xml.

Also updates IDE project files and circleci to utilize new
sstableloader-specific targets.

patch by Andy Tolbert; reviewed by Stefan Miklosovic and Mick Semb Wever for CASSANDRA-20328
2025-05-18 12:35:52 -05:00
jaydeepkumar1984 7ab1e3827c Stop AutoRepair monitoring thread upon Cassandra shutdown
patch by Jaydeepkumar Chovatia; reviewed by Bernardo Botella, Andrew Tolbert for CASSANDRA-20623
2025-05-16 14:47:57 -07:00
Dmitry Konstantinov 95716f6b4b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Relax validation of snapshot name as a part of SSTable files path validation
2025-05-16 13:12:43 +01:00
Dmitry Konstantinov 96b3db90fb Relax validation of snapshot name as a part of SSTable files path validation
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20649
2025-05-16 12:50:42 +01:00
Stefan Miklosovic 6cfea18dda
Avoid duplicate hardlink error upon forceful taking of ephemeral snapshots during repair
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-20490
2025-05-16 09:59:15 +02:00
Alex Petrov 0894665243 Ninja: remove .orig file from repository 2025-05-13 11:19:56 +02:00
Marcus Eriksson 629b02599e Merge branch 'cassandra-5.0' into trunk 2025-05-12 13:31:18 +02:00
Marcus Eriksson 29746cffbb Merge branch 'cassandra-4.1' into cassandra-5.0 2025-05-12 13:29:36 +02:00
Marcus Eriksson d4fb51347c Merge branch 'cassandra-4.0' into cassandra-4.1 2025-05-12 13:22:01 +02:00
Josh McKenzie f2e3a0a4fc Handle sstable metadata stats file getting a new mtime after compaction has finished
Patch by Josh McKenzie and marcuse; reviewed by Josh McKenzie and marcuse for CASSANDRA-18119
2025-05-12 13:16:50 +02:00
Caleb Rackliffe ab1ce5938d Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Optimize initial skipping logic for SAI queries on large partitions
2025-05-08 14:57:13 -05:00
Sunil Ramchandra Pawar 7a8335c273 Optimize initial skipping logic for SAI queries on large partitions
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-20191
2025-05-08 14:28:07 -05:00
Stefan Miklosovic f91655df06
When a custom disk error handler fails to initiate, fail the startup of a node instead of using the no-op handler
patch by Stefan Miklosovic; reviewed by Caleb Rackliffe for CASSANDRA-20614
2025-05-07 08:18:03 +02:00
Ariel Weisberg b9395acad6 Fix AccordMigrationTest not marking nodes down correctly
Patch by Ariel Weisberg; Reviewed by Caleb Rackliffe for CASSANDRA-20621
2025-05-06 13:27:45 -04:00
Stefan Miklosovic c24fbd814a
Rewrite constraint framework to remove column specification from constraint definition, introduce SQL-like NOT NULL
patch by Stefan Miklosovic; reviewed by Bernardo Botella Corbi for CASSANDRA-20563

Co-authored-by: Bernardo Botella Corbi <contacto@bernardobotella.com>
2025-05-06 15:31:39 +02:00
Szymon Miężał 12c5495d2f Reading mmapped trie-index exceeding 2GiB results in exception
Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer
bounds.

This patch fixes it by making sure that the buffers are correctly
aligned.

patch by Szymon Miezal; reviewed by blambov and brandonwilliams for CASSANDRA-20351
2025-05-06 06:39:20 -05:00
Szymon Miężał 6a81306876 Reading mmapped trie-index exceeding 2GiB results in exception
Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer
bounds.

This patch fixes it by making sure that the buffers are correctly
aligned.

patch by Szymon Miezal; reviewed by blambov and brandonwilliams for CASSANDRA-20351
2025-05-06 06:38:53 -05:00
jaydeepkumar1984 f6eb4a6b31 Fix a bug in AutoRepair duration metric calculation if schedule finishes quickly
patch by Jaydeepkumar Chovatia; reviewed by Andy Tolbert for CASSANDRA-20622
2025-05-05 23:17:42 -05:00
jaydeepkumar1984 f2bf017e6d Fix AutoRepair Flaky InJvm dtest
Patch by Jaydeepkumar Chovatia; Reviewed by Andy Tolbert, Chris Lohfink for CASSANDRA-20620
2025-05-05 17:34:28 -05:00
David Capwell 0a4777dae4 zero copy streaming allocates direct memory that isnt used, but does help to fragment the memory space
patch by David Capwell; reviewed by Yifan Cai for CASSANDRA-20577
2025-05-02 17:00:20 -07:00
David Capwell 234763f057 Remove Accord CQL words from the reserved keywords list
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20613
2025-05-02 12:51:36 -07:00
Doug Rohrer 3bc266ca96 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  CASSANDRA-20609 - CQLSSTableWriter should support setting the format (5.0)
2025-05-01 13:50:33 -04:00
Doug Rohrer 2aeb6a0290 CASSANDRA-20609 - CQLSSTableWriter should support setting the format (5.0) 2025-05-01 13:33:57 -04:00
jaydeepkumar1984 58d1cc9b1e Increasing default for auto_repair.sstable_upper_threshold considering large Cassandra tables 2025-04-29 09:36:19 -05:00
Marcus Eriksson 5e003af516 Fix token restrictions with MIN_TOKEN
Patch by marcuse and David Capwell; reviewed by David Capwell for CASSANDRA-20557
2025-04-28 15:51:11 +02:00
Caleb Rackliffe 5b0956be4b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Ensure RowFilter#isMutableIntersection() properly evaluates numeric ranges on a single column
2025-04-27 10:15:51 -05:00
Caleb Rackliffe 4bcae8e57e Ensure RowFilter#isMutableIntersection() properly evaluates numeric ranges on a single column
patch by Caleb Rackliffe; reviewed by Ariel Weisberg for CASSANDRA-20566
2025-04-27 09:46:59 -05:00
Nikolay Izhikov fc97fd1037
Upgrade logback version to 1.5.18 and slf4j dependencies to 2.0.17
patch by Nikolay Izhikov; reviewed by Stefan Miklosovic, Maxim Muzafarov, Brandon Williams for CASSANDRA-20429
2025-04-25 14:24:35 +02:00
Dmitry Konstantinov a93f0819e3 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add LittleEndianMemoryUtil and NativeEndianMemoryUtil, switch memtable-related off-heap objects and Memory to use them and have Little Endian now. Add BE offsets detection on Summary loading. Add test SSTables in an old format with BE offsets in Summary component to LegacySSTableTest.
2025-04-24 12:20:09 +01:00
Dmitry Konstantinov ae82efc013 Add LittleEndianMemoryUtil and NativeEndianMemoryUtil, switch memtable-related off-heap objects and Memory to use them and have Little Endian now.
Add BE offsets detection on Summary loading.
Add test SSTables in an old format with BE offsets in Summary component to LegacySSTableTest.

Patch by Dmitry Konstantinov; reviewed by Branimir Lambov, Michael Semb Wever for CASSANDRA-20190
2025-04-24 11:45:26 +01:00
David Capwell df24dacc0c Merge branch 'cassandra-5.0' into trunk 2025-04-23 18:00:34 -07:00
David Capwell 07831c9cc7 SAI marks an index as non-empty when a partial partition/row modifications is flushed due to repair
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20567
2025-04-23 17:58:45 -07:00
Sunil Ramchandra Pawar 97037496f2 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-23 15:05:54 -07:00
jaydeepkumar1984 6753fb49dc Automated Repair Inside Cassandra for CEP-37
patch by Jaydeepkumar Chovatia; reviewed by Andy Tolbert, Chris Lohfink, Francisco Guerrero, Kristijonas Zalys for CASSANDRA-19918
2025-04-23 11:04:36 -05:00
Stefan Miklosovic 8fcf309dad
Implement appender of slow queries to system_views.slow_queries table
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov, Bernardo Botella for CASSANDRA-13001
2025-04-23 09:28:22 +02:00
maulin-vasavada bcea8f5815
Refactor EncryptionOptions to use client / server encryption options builders
patch by Maulin Vasavada; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-20404
2025-04-23 09:27:09 +02:00
Jon Meredith 4805123eb8 Merge branch 'cassandra-5.0' into trunk 2025-04-22 16:08:20 -06:00
Jon Meredith 32cfd477df Merge branch 'cassandra-4.1' into cassandra-5.0 2025-04-22 14:43:49 -06:00
Jon Meredith 2ac701629b Merge branch 'cassandra-4.0' into cassandra-4.1 2025-04-22 14:42:51 -06:00
Jon Meredith d4d858d382 Updating a column with a new TTL but same expiration time is non-deterministic and causes repair mismatches.
patch by Jon Meredith; reviewed by Marcus Eriksson for CASSANDRA-20561
2025-04-22 14:42:02 -06:00
Benedict Elliott Smith 95c6fd481a Serialization improvements
- Share TableMetadatas and PartitionKey for PartialTxn serialization
Also:
 - TxnReference et al should reference uniqueId, and avoid serializing ksName/cfName
 - Don't double count shared keys when estimating size on heap

 patch by Benedict; reviewed by David Capwell for CASSANDRA-20578
2025-04-22 19:49:44 +01:00
Branimir Lambov f327b63db0 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
2025-04-19 13:21:14 -07:00
Francisco Guerrero 8d16b6b074 Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  allow grant permission on virtual keyspaces
2025-04-18 09:31:22 -07:00
Francisco Guerrero b83fef6efa Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  allow grant permission on virtual keyspaces
2025-04-18 09:19:49 -07:00
Francisco Guerrero 60ea852811 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  allow grant permission on virtual keyspaces
2025-04-18 09:16:00 -07:00
Tibor Répási 348ffb0ba0 allow grant permission on virtual keyspaces
Patch by Tibor Répási; reviewed by Francisco Guerrero, Maxwell Guo for CASSANDRA-20171
2025-04-18 09:13:04 -07:00
David Capwell 91f29a1f86 Accord: Hopefully last rebase cleanup
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20568
2025-04-17 14:57:01 -07:00
Alex Petrov 4cdbb5cf2a Accord: Test fixes
patch by Alex Petrov; reviewed by Benedict Elliott Smith, David Capwell for CASSANDRA-20552
2025-04-17 11:59:56 -07:00
David Capwell 6c6082b5d0 Accord: switch back to 1g heap to keep CI stable
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20553
2025-04-17 11:59:56 -07:00
David Capwell dc841f5481 Fix RouteIndexTest when run with -latest.yaml
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20549
2025-04-17 11:59:56 -07:00
Benedict Elliott Smith 19048ef570 Improve Journal table key serialization
Also improve:
 - TxnId serialization
 - StoreParticipants serialization
 - compareUnsigned Node.Id for consistency with serialized TxnId

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20546
2025-04-17 11:59:56 -07:00
Alex Petrov 68aea4b15f Fix simulator after rebase
* avoid running python3-dependent tasks when running simulator tasks
  * fix a problem with simulated snitch rebase
  * add a distinction between short-lived daemon threads and infinite loop ones for cases when we need to simulate user-implemented infinite loops

Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20542
2025-04-17 11:59:56 -07:00
Benedict Elliott Smith e87d5e5020 Various fixes and improvements
Improve:
 - InMemoryJournal compaction should simulate files to ensure we compact the same cohorts of records (so shadowing applied correctly)
 - Don't update CFK deps if already known
 - avoid unnecessary heapification of LogGroupTimers
 - begin removal of Guava (mostly unused)
 - consider medium path on fast path delayed
 - add Seekables.indexOf to support faster serialization
 - unboxed Invariant.requires variant
 - AsyncChains.addCallback -> invoke
Fix:
 - Recovery must wait for earlier transactions on shards that have not yet been accepted, even if we recover a fast Stable record on another shard
 - only skip Dep calculation on PreAccept if vote is required by coordinator
 - ReadTracker must slice Minimal the first unavailable collection
 - If PreLoadContext cannot acquire shared caches, still consider existing contents
 - CFK: make sure to insert UNSTABLE into missing array
 - Fix failed task stops DelayedCommandStore task queue processing further tasks
 - short circuit AbstractRanges.equals()
 - Handle edge case where we can take fast/medium path but one of the Deps replies contains a future TxnId
 - update executeAtEpoch when retryInFutureEpoch
 - Fix incorrect validation in validateMissing (should only validate newInfo is not in missing when in witnessedBy; all other additions should be included)

patch by Benedict; reviewed by David Capwell for CASSANDRA-20522
2025-04-17 11:59:56 -07:00
David Capwell 92212b2255 Fix upgrade TTL tests that fail due to improved error detection in cep-15-accord
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20535
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith f519538092 Switch to plain Thread for AccordExecutor, and improve testing for ASYNC mode
patch by Benedict; reviewed by David Capwell for CASSANDRA-20521
2025-04-17 11:59:55 -07:00
Alex Petrov 14b6395434 Accord: test fixes and stability improvements
* Fix short accord simulation test (seed 0x6bea128ae851724b), ConcurrentModificationException
  * Increase wait time during closing to avoid Unterminated threads
  * Increase timeouts, improve test stability
  * More descriptive output from CQL test
  * Shorten max CMS delay
  * Improve future handling in config service

Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20440
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith fb05d224e7 Fix:
- Accord Journal purging was disabled
 - remove unique_id from schema keyspace
 - avoid String.format in Compactor hot path
 - avoid string concatenation on hot path; improve segment compactor partition build efficiency
 - Partial compaction should update records in place to ensure truncation of discontiguous compactions do not lead to an incorrect field version being used
 - StoreParticipants.touches behaviour for RX was erroneously modified; should touch all non-redundant ranges including those no longer owned
 - SetShardDurable should correctly set DurableBefore Majority/Universal based on the Durability parameter
 - fix erroneous prunedBefore invariant
 - Journal compaction should not rewrite fields shadowed by a newer record
 - Don't save updates to ERASED commands
 - Simplify CommandChange.getFlags
 - fix handling of Durability for Invalidated
 - Don't use ApplyAt for GC_BEFORE with partial input, as might be a saveStatus >= ApplyAtKnown but with executeAt < ApplyAtKnown

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20441
2025-04-17 11:59:55 -07:00
Alex Petrov 289dbb7a05 Accord repin: turn pruning back on
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20114
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith 890be9c6e5 Fix:
- Decouple command serialization from TableMetadata version; introduce ColumnMetadata ids; gracefully handle missing TableId
 - DataInputPlus.readLeastSignificantBytes must truncate high bits
 - Fix RandomPartitioner accord serialization
 - Fast path stable commits must not override recovery propose/commit decisions regarding visibility of a transaction
 - RejectBefore must mergeMax, not merge, to ensure we maintain epoch and hlc increasing independently
 - Bad commitInvalidate decision
 - consistent filtering for touches and stillTouches
 - ensure TRUNCATE_BEFORE implies SHARD_APPLIED
 - TopologyManager.unsyncedOnly off-by-one error
 - DurabilityQueue should not retry SyncPointErased
 - handle rare case of no deps but none needed
 - not updating CFK synchronously on recovery, which can lead to erroneous recovery decisions for other transactions
 - Don't return partial read response when one commandStore rejects the commit
 - Filter touches/stillTouches consistently
 - WaitingState computeLowEpoch must use hasTouched to handle historic key with no route
Improve:
 - Use format parameters to defer building Invariants.requireArgument string
 - streamline RedundantStatus/RedundantBefore
2025-04-17 11:59:55 -07:00
David Capwell 94f720476e Topology mixup tests should do repairs for host replacement and other required topology changes
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20426
2025-04-17 11:59:55 -07:00
Alex Petrov 03053b14bf Implement Nemesis compactor, improve partial compaction
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20424.
2025-04-17 11:59:55 -07:00
Alex Petrov 2999d8f235 Epoch/Topology Garbage Collection
Patch by Alex Petrov; reviewed by Benedict Elliott Smith CASSANDRA-20347.
2025-04-17 11:59:55 -07:00
David Capwell e3982ce0bb When bootstrap fails the retry field is not populated which leads to a NPE
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20417
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith ab556ab545 InterceptingExecutor.schedule returns a simulator-unsafe Future
patch by Benedict Elliott Smith; reviewed by David Capwell for CASSANDRA-20420
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith 430c55dbc4 Integrate RX with Cassandra Repair, so that repair safely flushes pending topology and other durability requirements.
Also improve:
 - Introduce DurabilityService
 - Retire SyncPoint, replace Barrier with Write and RX
 - MessageType -> enum, restore GetMaxConflict
 - Standardise backoff logic with WaitStrategy
 - improve TimeoutStrategy/RetryStrategy specification strings
 - Forbid KX, remove directKeyDeps
 - Introduce UniqueTimeService, permitting hlc reservations for sync points avoid delay when min TxnId is sufficiently in the past
 - Remove ListStore custom purge logic
Also fix:
 - RejectBefore should reject on both epoch and hlc
 - Do not record sync success for removed nodes
 - Support GlobalDurability detecting no command store to run on
 - Incorrect ballot constructor
 - Serializing 15-bit ballot flags incorrectly
 - TopologyManager.hasEpoch deadlock
 - Computing withOpenEpochs incorrectly, sometimes stopping one epoch short
 - PartitionKey serializer should not depend on schema information that can be erased

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20395
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith a12f0ac9db Accord fixes:
- Bad ArrayBuffers recycling logic
 - RX must ensure dependencies TRANSITIVE_VISIBLE
 - Permit constructing "antiRange" that spans multiple prefixes
 - Not computing range CommandSummary IsDep correctly
 - Truncated commands that aren't shard durable could not repopulate CFK on replay, permitting recovery of another command to make an incorrect decision
 - NPE on async persist of RX (i.e. supplying no callback)
 - NPE in Builder.shouldCleanup when durability is null

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20370
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith 5086846494 Fix:
- Only use persisted RedundantBefore for compaction
 - RouteIndex should index only touches, not Route
 - Flush RangesForEpoch updates to journal immediately, so we do not rely on the command we are processing succeeding
 - DurableBefore updates must wait for the epochs to be known locally
 - Shard.mustWitnessEpoch to support guaranteeing to witness relevant non-topology schema changes
 - We must propagate RedundantBefore RX shard bounds along with epoch syncs
 - Prevent a truncated transaction FetchData infinite loop
 - GC_BEFORE status being overwritten by bootstrappedAt, permitting old transaction state to be resurrected
 - Avoid CFK.maxUniqueHlc read race on bootstrap
 - TopologyManager.awaitEpoch could wait for wrong epoch
 - Journal fsync thread could miss notifications
Also improve:
 - CommandStores uses SearchableRangeList for finding matching stores
 - Refactor RedundantBefore to use a sorted array of TxnId/RedundantStatus pairs (to better fix GC_BEFORE issue)
 - Accord debug keyspace operates on keyspace/table, and sorts correctly by token

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20361
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith e9a0d8ef8e Accord: Serialization Improvements
Improve:
 - Introduce pre/accept fast execution flags
 - Introduce searchable Deps serialization
 - Flatten AccordRoutingKey(s) into single type, using sentinel bits
 - Introduce new fast byte-comparable serialization methods for Token and TableId to support above
Fix:
 - Fix journal re-serialization logic
 - Enable RandomPartitioner for Accord by supporting fixed-width serialization for RouteIndex

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20349
2025-04-17 11:59:55 -07:00
Alex Petrov 1d5146a22e Improve stability of tests with many epochs
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20358
2025-04-17 11:59:55 -07:00
Alex Petrov 67e21ec4ba Fix AccordMigrationTest, preclude possible races in topology propagation
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20316
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith 64c4aa88f5 (Accord) Fix recovery when one shard is committed/stable and another is preaccepted
Also fix:
 - Topology slicing must declare whether we share/slice node ownership (to assist above)
 - CFK.visit removes transitive dependencies too eagerly across epoch change
 - apply cleanup to builder consistently, and construct the same value we would produce by purge (so that replay is idempotent)
 - Invoke ExecuteTxn.LocalExecute callbacks on originating CommandStore
 - misc other minor issues

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20325
2025-04-17 11:59:55 -07:00
David Capwell 3fb23e0247 Fix flakey test org.apache.cassandra.simulator.test.ShortPaxosSimulationTest#casOnAccordSimulationTest
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20322
2025-04-17 11:59:55 -07:00
David Capwell b81d13f994 Expose epoch ready state as a vtable for operators to inspect things
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20302
2025-04-17 11:59:55 -07:00
Alex Petrov 1aaf0bb336 Fix null field accounting
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20297
2025-04-17 11:59:55 -07:00
Alex Petrov 3324e23f64 Fix topology loading
Use initializeTopologyUnsafe to for-load the last topology and create shards rather than replaying all topologies.

Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20294
2025-04-17 11:59:55 -07:00
David Capwell 5e9e2b2b04 Accord: TableParamsTest is flakey due to bad generators and production validation logic missed the argument to String.format causing confusing errors
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-20286
2025-04-17 11:59:55 -07:00
Benedict Elliott Smith b017ae8175 Add @Ignore to failing tests while we triage 2025-04-17 11:59:55 -07:00
Benedict Elliott Smith d7ed1ad391 Fix:
- Even if we can decide autonomously that we took the fast path, we must still wait for earlier transactions to decide themselves
 - We must update a command that is in CFK.loadingPruned whether or not it is outOfRange
 - We must visit pruned commands that are transitive dependencies of RX to ensure dependencies are propagated
 - flagsWithoutDomainAndKind() -> flagsWithoutDomainOrKindOrCardinality() [to fix integration regression]
 - Don't invoke uniqueNow() twice when allocate nextTxnId
 - BTreeReducingRangeMap edge case that corrupts map when merge function does not return one of its inputs

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20292
2025-04-17 11:59:55 -07:00
Alex Petrov 080d6c633d Avoid double loading in Cassandra side of journal; make sure to include records appended to journal.
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20244
2025-04-17 11:59:55 -07:00
David Capwell 4f2e306c26 Accord: jvm-dtest changed semantics of uncaughtExceptions handling which broke tests that depended on the prior semantics
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20248
2025-04-17 11:59:54 -07:00
David Capwell f345011822 When generating AbstractTypeGenerators.safeTypeGen() for tests composite types limit depth but collections didnt
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-20283
2025-04-17 11:59:54 -07:00
Benedict Elliott Smith af7dfcc327 Refactor RedundantStatus to encode vector of states that can be merged independently
Also fix:
 - Truncate command on first access, without participants
 - Use Ballot.ZERO when invoking CFK.insertOutOfRange where appropriate
 - Don't supply a command's own route to ProgressLog.waiting to ensure new keys are incorporated
 - Ensure progress in CommandsForKey by setting vestigial commands to ERASED
 - Add any missing owned keys to StoreParticipants.route to ensure fetch can make progress
 - Recovery must wait for earlier not-accepted transactions if either has the privileged coordinator optimisation
 - Inclusive SyncPoint used incorrect topologies for propose phase
 - Barrier must not register local listener without up-to-date topology information
 - Stop home shard truncating a TxnId to vestigial rather than Invalidated so other shards can make progress
Also improve:
 - Validate commands are constructed with non-empty participants
 - Remove some unnecessary synchronized keywords
 - Clear ok messages on PreAccept and Accept to free up memory
 - Introduce TxnId.Cardinality flag so we can optimise single key queries
 - Update CommandsForKey serialization to better handle larger flag space
 - Configurable which Txn.Kind can result in a CommandStore being marked stale
 - Process DefaultProgressLog queue synchronously when relevant state is resident in memory
 - Remove defunct CollectMaxApplied version of ListStore bootstrap
 - Standardise linearizability violation reporting
 - Improve CommandStore.execute method naming to reduce chance of misuse
 - Prune and address some comments

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20282
2025-04-17 11:59:54 -07:00
Alex Petrov c4a5971af3 Improve topology fetching
- preclude TCM of being behind Accord if newer epoch is reported via withEpoch/fetchTopologyInternal
  - improve topology discovery during first boot and replay
  - fix races between config service TCM listener reporting topologies, and fetched topologies during

Patch by Alex Petrov, reviewed by Ariel Weisberg and David Capwell for CASSANDRA-20245
2025-04-17 11:59:54 -07:00
David Capwell d543cc9107 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-04-17 11:59:54 -07:00
Benedict Elliott Smith 113d83417e Follow-up to CASSANDRA-20222:
- Implement missing parts of protocol optimisations, refine some particulars and remove MEDIUM_PATH_WAIT_ON_RECOVERY
Also fix:
 - Deps.txnIds -> Deps.txnIdsWithFlags to make clear unsafety, and validate Command isn't created with flags
 - Save a lossy low/high epoch we're waiting on in WaitingState so that we can reconstruct the same Route on callback
 - Load any potentially invalidated commands we had in ProgressLog to ensure they are marked invalidated locally and notify any waiters
 - Refine Invariant to accept case where a truncated dependency should apply first but both transactions are redundant and only the waiter could not be cleaned up
 - only update CFK.maxUniqueHlc using commands we execute
 - Don't update uniqueHlc when zero to avoid incompatible transaction invariant check

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20222
2025-04-17 11:59:54 -07:00
Ariel Weisberg f55653ecb0 Fix paging with Accord range reads
With paging it's possible for the range Accord needs to read from to have the start and end token be the same in which case the LHS token needs to be converted to a MinTokenKey

Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-20262
2025-04-17 11:59:54 -07:00
Ariel Weisberg d88596b6a4 Fix ShortAccordSimulationTest
Patch by Ariel Weisberg; Reviewed by Alex Petrov for CASSANDRA-20264
2025-04-17 11:59:54 -07:00
Ariel Weisberg 6522d52b0b Live migration for non-serial reads
Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-19439
2025-04-17 11:59:54 -07:00
Alex Petrov cf9e34df45 Fix empty LatestDepsSerializer
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20252
2025-04-17 11:59:54 -07:00
Benedict Elliott Smith 7f0e5f8e8b Follow-up to CASSANDRA-20228:
- Fix waiting state callback computes different route to initiator
 - Invariants.checkX -> Invariants.requireX (to allow complementary Invariants.expectX as appropriate)

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20228

Follow-up to CASSANDRA-20228:
 - Fix AccordUpdateParameters to correctly supply List cell paths derived from applyAt
 - Fix ExecuteAtSerialize.serialiseNullable
 - Fix topologies flush regression caused by markRetired forcing a flush on every call

patch by Benedict; reviewed by Ariel Weisberg for CASSANDRA-20228
2025-04-17 11:59:54 -07:00
Benedict Elliott Smith 5be214a417 Agree a distributed uniqueHlc to use for Apply
- detect and save whether RX can be used as a GC bound for HLCs
 - have RX durably record if they witnessed any superseding epoch and use this for HLC GC
 - rework GC to retain applyAt for writes

Also improve:
 - PreCommitted overwrites fast path vote, then loses tie-break with NotAccept, so we don't recover
 - track executeAtLeast and uniqueHlc separately from WaitingOn in CommandChange
 - Always propose executeAt.hlc() >= txnId.hlc()
 - Short-circuit recovery if ApplyAt already known
Also fix:
 - Dangling recovery when Commit rejected
 - Failed epoch fetch handling in DefaultProgressLog
 - CommandsForKey must track Accept executeAt for computing earlierWait collection on recovery
 - Report DefaultProgressLog exceptions before retrying
 - Fix inverted condition in RecoverWithRoute
 - Remove laterNoWait from laterWait collection in recovery
 - Invalidate incorrectly selected maxNotTruncated if max had a not truncated component
 - WaitingState.fetch not request/propagating prior epochs
 - CFK visit active pruning was comparing txn against maxCommittedWriteBefore rather than maxCommittedWriteForEpoch

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20228
2025-04-17 11:59:54 -07:00
Alex Petrov b50536f1a4 Fix Simulator Tests
Patch by Alex Petrov and Benedict Elliott Smith; reviewed by Alex Petrov and Benedict Elliott Smith for CASSANDRA-20240.
2025-04-17 11:59:54 -07:00
Aleksey Yeschenko b8a3706ef9 Remove Journal record ownership tags functionality
patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for
CASSANDRA-20229
2025-04-17 11:59:54 -07:00
David Capwell 3c7cb1e3b3 Migrate route index from commands table to journal, and drop the commands table
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-20144
2025-04-17 11:59:54 -07:00
Benedict Elliott Smith 3e16efa490 Protocol optimisations:
- Privileged coordinator. If the coordinator is a replica we can reduce our quorum sizes by including the coordinator's vote.
   - with deps: if we include coordinator's preaccept deps we can reliably reduce quorum size by 1, at the expense of recovery sometimes requiring additional phases and waiting for future txns
   - with only vote: if we only include the vote we can avoid any additional recovery phases or waiting for future txns, but can reduce our quorum size for only some configurations
 - Medium path. If t=t0 at a simple majority we can take just two rounds.
   - with additional phase: on recovery, earlier txns must wait for medium path to be disabled (or committed) so we do not accidentally recover a transaction that won't be witnessed
   - with unstable deps: on slow path commit, deps not found in accept as committed as unstable and do not affect recovery decisions for earlier transactions
Also improve:
 - Recovery of await conditions simply recalculates the rejects flag rather than restarting to ensure faster forward progress
 - refactor Command hierarchy
 - tweak: don't save Writes for non-write transactions
Also fix:
 - isOutOfRange when invoked from callback for some txn < Committed
 - handle loadingPruned that is pre-bootstrap on update to bootstrappedAt
 - journal replay can overwrite in memory state loaded for a command not yet replayed
 - subtle ordering bug in LatestDeps.mergeProposal
 - fix occasional class initialisation order bug
 - handle race condition on learning of topology

patch by Benedict; reviewed by Aleksey Yeschenko for CASSANDRA-20222
2025-04-17 11:59:54 -07:00
Alex Petrov 13625288c6 Fix ForceSnapshotTest
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-20223.
2025-04-17 11:59:54 -07:00
Alex Petrov 72f3828c0b Fix CoordinatorReadLatencyMetricTest
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-20216
2025-04-17 11:59:54 -07:00
Alex Petrov 21f9f248cd Fix serialization order for topology updates
Patch by Alex Petrov; reviewed by David Capwell for CASSANDRA-20219.
2025-04-17 11:59:54 -07:00
Benedict Elliott Smith ed2ca6e2fb FetchRequest should report as unavailable any slice that executes in a later epoch that is not owned by the replicas
Improve:
 - Remove GetMaxConflict; use local MaxConflict collection

Fix:
 - Invalidated should retain StoreParticipants so we can update CFK on journal replay
 - loading pruned uninitialised commands via CFK: make sure hasTouched contains key so that if invalidated we are notified
 - updateExecuteAtLeast should always be higher than TxnId
 - Async CFK callbacks treated pruned transactions incorrectly
 - node.withEpoch when ExecuteEphemeralRead in futureEpoch
 - Deps.without should be key/range aware
 - Durably mark bootstrapBeganAt and safeToReadAt in MaxConflicts
 - Don't attempt to calculate local deps when DepsErased in GetLatestDeps (command has durably applied to this shard)
 - filter StoreParticipants before invoking shouldCleanup

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20183
2025-04-17 11:59:54 -07:00
Alex Petrov dfcf3aff4e Fix topology replay during bootstrap and startup, decouple Accord from TCM
Includes multiple changes, primary ones:
  * Make HarrySimulatorTest work with Accord
  * Removed nodes now live in TCM, no need to discover historic epochs in order to find removed nodes
  * CommandStore <-> RangesForEpochs mappings required for startup are now stored in journal, and CS can be set up _without_ topology replay
  * Topology replay is fully done via journal (where we store topologies themselves), and topology metadata table (where we store redundant/closed information)
  * Fixed various bugs related to propagation and staleness
     * TCM was previously relied on for "fetching" epoch: we can not rely on it as there's no guarantee we will see a consecutive epoch when grabbing Metadata#current
     * Redundant / closed during replay was set with incorrect ranges in 1 of the code paths
     * TCM was contacted multiple times for historical epochs, which made startup much longer under some circumstances

Patch by Alex Petrov; reviewed by  Benedict Elliott Smith for CASSANDRA-20142
2025-04-17 11:59:54 -07:00
David Capwell 17dbba770b Refactor the ast package to enable harry model based testing
patch by David Capwell; reviewed by Abe Ratnofsky, Caleb Rackliffe for CASSANDRA-20155
2025-04-17 11:59:54 -07:00
Alex Petrov b664d3e616 Migrate in memory journal to CommandChange logic shared with AccordJournal
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20115
2025-04-17 11:59:54 -07:00
Benedict Elliott Smith 52242f23a8 Remove TimestampsForKey
patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20174
2025-04-17 11:59:53 -07:00
Benedict Elliott Smith 44cd181438 Fixes
- Fix notifying unmanaged after update redundant before/bootstrap
     - Do not infer invalid if we have a single round of replies with minKnown not decided and maxKnown erased - in this case store the knowledge for next request.
     - Fix SyncPoint topology selection
     - Fix CheckStatusOkFull.with(InvalidIf)
     - Fix NotifyWaitingOn
     - ExecuteTxn should only contact latest topology for follow-up requests
     - DurableBefore.min should not go backwards on new epoch topology, journal replay was not correctly handling PreApplied, partialTxn can be null if not owned
     - Fix notify pre-bootstrap that arrives post-bootstrap
     - Avoid GC race condition on Propagate where we can incorrectly infer a shard is stale
     - Ensure redundantBefore on previously-owned range does not imply redundant before for overlapping queries on still-owned range
     - Ensure we don't mark stale unless all of the quorum we contacted had erased, else we may have raced with the agreement and erase
     - Fix Invalidate when no route found for FetchData does not report to all requested local epochs
     - Fix WAS_OWNED_RETIRED without durableBefore at Universal can lead to assertions with RX that we permit to execute but that have not yet
     - Fix initialiseWaitingOn can in some cases transitively notify the command we're updating via maybeCleanup of dependencies, but the command isn't yet updated so isn't ready
     - Fix encountering a command that is pre-bootstrap, and for which we have locally 'applied' a supserseding RX, so that we do not know its outcome locally (so we do not cleanup the command), but also it must have been decided - and we should not respond with future dependencies.
     - Epoch failures on CoordinatePreAccept should trigger the CoordinatePreAccept failure handler
     - Use the shard bound rather than GC bound for fallback dependency
     - LatestDeps should be sliced to actual route, so as not to use both PreAccepted AND Stable deps as though Stable
     - Fix various callback issues with node.withEpoch and Recover/Propose.isDone
     - RecoverWithRoute can encounter a partially truncated transaction where the Deps for one shard are not committed. Must fetch LatestDeps.
     - Tighten LatestDeps semantics for Recover
     - CommandsForKey: do not restore pruned as APPLIED
     - Ensure prune points execute in the epoch in which they are declared
     - must merge all fast path votes including those from earlier epochs that may have witnessed a later transaction
     - Recoveries that know the transaction is committed a priori should skip the Accept phase
     - Maintain GC behaviour for redundant commands that are pre-bootstrap
     - don't apply ERASE to CommandsForKey to avoid breaking pruning
     - Introduce clearBefore to ProgressLog to more consistently handle cleaning up redundant transactions (and avoid triggering burn test invariants)
     - don't replay journal of a bootstrapping node in burn test
     - Recover, Accept or Commit reply from epoch that has been retired should be treated as Success rather than Redundant
     - Distinguish completely REDUNDANT+PRE_BOOTSTRAP from partially GC_BEFORE and REDUNDANT+PRE_BOOTSTRAP - latter can make stronger inferences based on the GC_BEFORE intersection (could perhaps be treated as simply GC_BEFORE)
     - RX must register historical transactions with CFK
     - CommandStore.bootstrapper must wait for coordinate sync via same mechanism as sync()
     - Don't start topology change for shard where all replicas are already bootstrapping
     - Reify executes et al in StoreParticipants
     - LocalListeners txn listener reentry may erase the entry entirely
     - use registerAt in AbstractRequest for expirations, use correct time for expiresAt in ListAgent
     - use txnId.epoch() for pruning, as must be before both txnId and executeAt of prune point for coordinating dependencies
     - compute accurate KnownMap when affected by bootstrap or staleness
     - upgradeTruncated should calculate Definition and Deps separately
     - Invalidate should not sort before Erased when calculating max reply or max knowledge reply
     - avoid another infinite loop at end of burn test
     - avoid another epoch loading edge case
     - pass through low/high epochs to ensure we propagate information to all waiting command stores
     - RX must adopt a non-pruned dependency that has a higher TxnId (if is itself behind prune point)
     - rejects should also be calculated on COMMITTED started before
     - remove Apply Factory wrapper for RX, redundant now we have CoordinationAdapters (and has faulty epoch logic)
     - for RX ensure we return maximum  writes for each epoch we intersect (same effectively as pruning logic)
     - rework updateUnmanaged to improve clarity
     - BeginRecovery constructor of LatestDeps should use touches() not owns() for compute localDeps
     - BeginRecovery superseding calculation was incorrectly treating startedBefore Committed and Accepted the same, when the point at which a dep should be known differs
     - Refactor Command visiting, porting C* integration to accord-core
     - RelationMultiMap Builder should resize keys and keyLimits independently
     - CommandsForKey Serialization moved to accord-core
     - losing ownership of range should trigger re-registration of unmanaged waiting on commit of a no-longer owned txn

    patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20172
2025-04-17 11:59:53 -07:00
Ariel Weisberg 21383d2789 Fix Accord SAI tests and Accord double apply
Patch by Ariel Weisberg and David Capwell; Reviewed by David Capwell for CASSANDRA-20089
2025-04-17 11:59:53 -07:00
Alex Petrov 211249b8a9 Implement field saving/loading in AccordJournal
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20114
2025-04-17 11:59:53 -07:00
David Capwell c114fc46d2 Accord simulation test failing with "ClassNotFoundException: WARN [AccordExecutor[1,0]"
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20127
2025-04-17 11:59:53 -07:00
Alex Petrov 74817bc83e Semi integrate burn test:
* Move serializers that previously were in static field into corresponding swappable accessors
  * Add a (no-op in Cassandra impl) Result serializer
  * Allow more than one Accord Journal table
  * Move some previously-Cassandra implementation details (such as FieldUpdates) to Accord
  * Fix a bug with sorting of Journal Key (incorrect non-identity flags)
  * Accord side: Make sure not to re-sort collection of events scheduled for application
  * Implement serializers for Accord/BurnTest List* items

Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20112.
2025-04-17 11:59:53 -07:00
Alex Petrov bad9805b7a Make it easier to reuse generators, make Harry more extensible and accord-proof, refactor Harry's major subsystems
* SELECT is now a regular Harry operation, not a separate "validate" step
  * Flushes (or any custom operation) are now a part of a model, Harry will run them for you
  * Simplified validation of subset/wildcard queries
  * All Operations and are now SchemaSpec-agnostic, and can use any generators (like QT or whatever)
  * You read it right, Harry now can use any generator and still be able to not to keep generated values in memory
  * There are no concepts of “descriptor selectors”, or “bijection” exposed anymore. You just provide a Generator, Harry figures out the rest.
  * All Cassandra data types are now supported
  * No upper limit on the number of columns (also, clustering columns)
  * Basic (for now) support for Transactions
  * It is now possible to visit multiple partition in the same Visit (essentially, for transactions)
  * Much much simpler to generate synthetic workloads now (basically, you just write a Generator
  * Add support for all single-cell types.

Most of it was just a refactoring of Harry, to allow the following (still pending):

  * Easier to add subset SELECTION (important for SAI testing)
  * Easier add support for functions
  * Easier to add support for collections and UDTs
  * Easier to add support for LET bindings

Patch by Alex Petrov; reviewed by David Capwell, Caleb Rackliffe, and Abe Ratnofsky for CASSANDRA-20080.
2025-04-17 11:59:53 -07:00
Benedict Elliott Smith ec7c7c9fce Accord: Fix unit tests and improve burn test stability
patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20113
2025-04-17 11:59:53 -07:00
Benedict Elliott Smith f2ea674140 Key transaction recovery should witness range transactions
patch by Benedict; reviewed by David for CASSANDRA-20105
2025-04-17 11:59:53 -07:00
Aleksey Yeschenko 304749ebda Set Accord debug tables partitioner to LocalPartitioner
patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for
CASSANDRA-20062
2025-04-17 11:59:53 -07:00
Ariel Weisberg 16b5e191f9 Non-serial reads and range reads without live migration support
Patch by Ariel Weisberg; Reviewed by Benedict Elliott Smith for CASSANDRA-19437
2025-04-17 11:59:53 -07:00
Aleksey Yeschenko bcf1abbd16 Implement missing virtual tables for Accord debugging
patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith and David
Capwell for CASSANDRA-20062
2025-04-17 11:59:53 -07:00
Ariel Weisberg b29eac16fe Split accord migration into two phases
Patch by Ariel Weisberg; Reviewed by Benedict Elliott Smith for CASSANDRA-19436
2025-04-17 11:59:53 -07:00
David Capwell 513509ee2c Accord's ConfigService lock is held over large areas which cause deadlocks and performance issues
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20065
2025-04-17 11:59:53 -07:00
Ariel Weisberg 6c0ad476ed Miscellaneous migration test fixes
Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-20060
2025-04-17 11:59:53 -07:00
David Capwell 9fe1a977b5 Get Harry working on top of Accord and fix various issues found by TopologyMixupTestBase
patch by David Capwell; reviewed by Alex Petrov, David Capwell for CASSANDRA-20054
2025-04-17 11:59:53 -07:00
Benedict Elliott Smith 5a12875b3a Use ExclusiveSyncPoints to join a new topology
For correctness, the dependencies we adopt on joining a new topology must exclude the possibility of respondents accepting additional transactions with a lower TxnId, so proxying on the existing `ExclusiveSyncPoint` mechanisms is logical for the time-being. This patch removes the `FetchMajorityDeps` logic in favour of simply waiting for a suitable `ExclusiveSyncPoint` to be proposed.

patch by Benedict, reviewed by Alex Petrov for CASSANDRA-20056
2025-04-17 11:59:53 -07:00
Alex Petrov 4e9110e881 Check for splittable ranges
Patch by Alex Petrov; reviewed by Ariel Weisberg for CASSANDRA-20032

Accord Deps tests have incorrect range semantics

patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20029
2025-04-17 11:59:53 -07:00
David Capwell e94d86b1e5 TopologyMixupTestBase does not fix replication factor for Keyspaces after reaching rf=3
patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-19975
2025-04-17 11:59:53 -07:00
David Capwell 1f80f99b71 Accord should block currently unsafe operations
patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20020
2025-04-17 11:59:53 -07:00
David Capwell 5afe99b7ca Accord metrics are isolated which cause existing coordination metrics to be empty, should also populate there as well
patch by David Capwell; reviewed by Benedict Elliott Smith for CASSANDRA-20017
2025-04-17 11:59:53 -07:00
Alex Petrov d1af562705 Shut down scheduler with "now"
Fix NPE in MockJournal on null onFlush
Fix SavedCommandTest.
After the serialization change that serializes "changed" before "is null", null flag can no be written.
2025-04-17 11:59:53 -07:00
Ariel Weisberg a51bed1c77 Accord should not block partition restricted index queries
Patch by Ariel Weisberg; Reviewed by David Capwell for CASSANDRA-19955

Non-serial single partition reads on Accord

Patch by Ariel Weisberg; Reviewed by Benedict Elliott Smith for CASSANDRA-19951
2025-04-17 11:59:53 -07:00
Alex Petrov 042a6e9769 Add bounce to load test 2025-04-17 11:59:52 -07:00
Benedict Elliott Smith 22df42c7be Store historical transactions per epoch
update durability scheduling and majority deps fetching
do not deserialize deps in CommandsForRangesLoader unless required

AccordJournalPurger should use shouldCleanupPartial

load historical transactions when loading topology
2025-04-17 11:59:52 -07:00
Benedict Elliott Smith 1734011032 Fix truncatedApply deserialization 2025-04-17 11:59:52 -07:00
Benedict Elliott Smith b8f3b74587 Journal diff serialization: validateFlags and WaitingOn size 2025-04-17 11:59:52 -07:00
Benedict Elliott Smith 25b1bd74b8 Enable and test purging 2025-04-17 11:59:52 -07:00
Benedict Elliott Smith aa6ebc140f Halve cache memory consumption by not retaining 'original' to diff; dedup RoutingKey tableId; avoid calculating rejectsFastPath in more cases; delay retry of fetchMajorityDeps; fix SetShardDurable marking shards durable 2025-04-17 11:59:52 -07:00
Benedict Elliott Smith 82ae3adcb2 ExclusiveSyncPoints should always wait for a simple quorum
split JournalKey in journal table so we can index it
reorder journal fields so we can easily index on route (when present)
use Message.expiresAtNanos for callback expiration
do not notify slow for range barriers

Accord: Do not contact faulty replicas, and promptly report slow replies for preaccept/read. Do not wait for stale or left nodes for durability.
2025-04-17 11:59:52 -07:00
Benedict Elliott Smith d8ccc36e4d visit journal backwards to save time parsing
don't load range commands that are redundant, and load least possible
use MISC verb handler for maintenance tasks
2025-04-17 11:59:52 -07:00
Benedict Elliott Smith 0e1819bbb3 Accord: Share DurableBefore between CommandStores 2025-04-17 11:59:52 -07:00
Alex Petrov 8f7b1c2351 Follow-up to CASSANDRA-19967 and CASSANDRA-19869
patch by Alex Petrov, Ariel Weisberg, Benedict Elliott Smith, Blake Eggleston and David Capwell
2025-04-17 11:59:52 -07:00
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