Commit Graph

7040 Commits

Author SHA1 Message Date
Stefan Miklosovic 39b1c2df89
Emit error when altering a table with non-frozen UDTs with nested non-frozen collections the same way as done upon table creation
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-19925
2024-09-18 22:44:39 +02:00
Bereng 366ee9da6c Add extra compaction junit
patch by Berenguer Blasi; reviewed by Branimir Lambov for CASSANDRA-19863
2024-09-18 08:41:42 +02:00
Caleb Rackliffe b4f1c6d250 Safer handling of out-of-range tokens
patch by Caleb Rackliffe; reviewed by Mick Semb Wever for CASSANDRA-13704

Co-authored-by: Sam Tunnicliffe <sam@beobal.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Mick Semb Wever <mck@apache.org>
Co-authored-by: Ariel Weisberg <aweisberg@apple.com>
2024-09-17 17:04:11 -05:00
Benedict Elliott Smith 2842c01ce7 Fix BTree.FastBuilder.reset() and test
Patch by benedict; reviewed by blambov for CASSANDRA-19785
2024-09-16 12:24:32 -05:00
maxwellguo 9f18aab1dc
Fix millisecond and microsecond precision for commit log replay
patch by Maxwell Guo; reviewed by Brandon Williams, Stefan Miklosovic for CASSANDRA-19448
2024-09-13 15:42:20 +02:00
Dmitry Konstantinov c56ba3b317
Improve accuracy of memtable heap usage tracking
Fix estimateRowOverhead in Memtable: ByteBuffer in Partition key was not counted
Fix non-counted size of "columns" field in Columns.unsharedHeapSize
BTree.sizeOfStructureOnHeap wrongly reported a non-zero size for EMPTY_LEAF shared constant value
Fix MemtableSizeTest flakeness by not measuring of allocator and ColumnFamilyStore/Keyspace

Patch by Dmitry Konstantinov; reviewed by Branimir Lambov, Stefan Miklosovic for CASSANDRA-17298
2024-09-09 12:00:11 +02:00
Lukasz Antoniak c53d3ac8c6 Fix rendering UNSET collection types in query tracing
Patch by Lukasz Antoniak reviewed by Jacek Lewandowski for CASSANDRA-19880
2024-08-30 10:41:38 +02:00
Dmitry Konstantinov 6da9141d3c Fix latency reported by ideal consistency level monitoring
patch by Dmitry Konstantinov; reviewed by Ariel Weisberg for CASSANDRA-19651
2024-08-21 16:01:46 -04:00
Caleb Rackliffe 93415c91af Use default commitlog settings in test YAMLs
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-19830
2024-08-15 10:12:39 -05:00
Stefan Miklosovic a5767a5834
Fix schema.cql created by a snapshot after dropping more than one column
patch by Stefan Miklosovic; reviewed Benjamin Lerer, Francisco Guerrero for CASSANDRA-19747
2024-07-10 10:34:54 +02:00
Marcus Eriksson d54646e409 UnsupportedOperationException when reducing scope for LCS compactions
patch by Caleb Rackliffe; reviewed by Zhao Yang, Brandon Williams, and Marcus Eriksson for CASSANDRA-19704

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
2024-07-02 13:35:34 -05:00
Benjamin Lerer 90208c0a29 Makes LWT conditions behavior on frozen and non-frozen columns consistent for null column values
Patch by Benjamin Lerer; review by Ekaterina Dimitrova for CASSANDRA-19637
2024-06-27 10:15:03 +02:00
Stefan Miklosovic 334ca05730
Make nodetool import congruent with the documentation by not relying on the folder structure of the imported SSTable files
nodetool import requires keyspace and table on the command line to import SSTables to. This
was not always working as specifying keypace and table while having SSTables located in the
directory structure which differed on keyspace and table (dir and parent dir) just
ignored them.

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-19401
2024-05-02 10:32:55 +02:00
David Capwell c14abb40b2 IR may leak SSTables with pending repair when coming from streaming
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-19182
2024-05-01 14:32:07 -07:00
Jon Meredith 9157d98e4c Streaming exception race creates corrupt transaction log files that prevent restart
patch by Jon Meredith; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-18736
2024-04-25 13:59:59 -06:00
Jacek Lewandowski f92998190c Fix few types issues and implement types compatibility tests
Patch by Jacek Lewandowski; reviewed by Stefan Miklosovic for CASSANDRA-19479
2024-04-18 12:33:52 +02:00
Caleb Rackliffe 0974a3656d Optionally avoid hint transfer during decommission
patch by Paul Chandler; reviewed by Caleb Rackliffe and Brandon Williams for CASSANDRA-19525
2024-04-08 15:22:10 -05:00
Runtian Liu c2041ba45b
Filter remote DC replicas out when constructing the initial replica plan for the local read repair
patch by Runtian Liu; reviewed by Blake Eggleston and Stefan Miklosovic for CASSANDRA-19120
2024-02-22 23:21:16 +01:00
Andrés de la Peña 505f5af645 Ensure that repair doesn't exceed repair_session_space by running limiting validation parallelism
patch by Andrés de la Peña; reviewed by David Capwell for CASSANDRA-19336

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
2024-02-08 11:09:21 +00:00
Jacek Lewandowski 9613af24f3 Merge branch 'cassandra-3.11' into cassandra-4.0
* cassandra-3.11:
  Backport CASSANDRA-16418 to 3.x
2024-02-07 15:12:01 +01:00
Jacek Lewandowski 2170825f0e Merge branch 'cassandra-3.0' into cassandra-3.11
* cassandra-3.0:
  Backport CASSANDRA-16418 to 3.x
2024-02-07 15:12:00 +01:00
Szymon Miężał 5be57829b0 Backport CASSANDRA-16418 to 3.x
When a node is decommissioned, it triggers data transfer to other nodes.
During this transfer process, receiving nodes temporarily hold token ranges in a pending state.
However, the current cleanup process doesn't account for these pending ranges when calculating token ownership,
leading to inadvertent cleanup of data already stored in SSTables.
To address this issue, this patch introduces two changes.
Firstly, it backports CASSANDRA-16418, introducing a preventive check in `StorageService#forceKeyspaceCleanup`.
This check disallows the initiation of cleanup when a node contains any pending ranges for the requested keyspace.
Secondly, it reintroduces a similar condition to test for the existence of pending ranges in `CompactionManager#performCleanup`.
This ensures the safety of this API as well.

Patch by Szymon Miezal; reviewed by Brandon Williams, Jacek Lewandowski for CASSANDRA-18824

Co-authored-by: Szymon Miezal <szymon.miezal@datastax.com>
Co-authored-by: Jacek Lewandowski <lewandowski.jacek@gmail.com>
2024-02-07 15:11:59 +01:00
Ekaterina Dimitrova 74079562f2 Merge branch 'cassandra-3.11' into cassandra-4.0 2024-01-31 11:15:49 -05:00
Ekaterina Dimitrova aa561f2373 Switch memtable_allocation_type from offheap_objects to heap_buffers in test/conf/cassandra.yaml
patch by Ekaterina Dimitrova; reviewed by Brandon Williams for CASSANDRA-19326
2024-01-31 11:11:35 -05:00
Runtian Liu ee9e418782
Skip version check if an endpoint is dead state in Gossiper#upgradeFromVersionSupplier
patch by Runtian Liu; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-19187
2024-01-11 10:37:11 +01:00
Ekaterina Dimitrova 290a5990d4 Fix flaky test org.apache.cassandra.tools.BulkLoaderTest.testBulkLoader_WithArgs1
patch by Ekaterina Dimitrova; reviewed by Berenguer Blasi for CASSANDRA-19205
2024-01-10 13:12:00 -05:00
Isaac Reath 475c0035e6 [CASSANDRA-18999] Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
This commit fixes Gossiper::hasMajorVersion3Nodes so that it does not return true when all hosts have a known version, no hosts are on a version earlier than 4.0, and there is a 4.x minor version or patch version upgrade in progress. Additionally, this commit improves the clarity of Gossiper::hasMajorVersion3Nodes's name to indicate that it will return true when the cluster has 3.x nodes or if the cluster state is unknown, matching the description in the in-line comment.

patch by Isaac Reath; reviewed by Paulo Motta and Stefan Miklosovic for CASSANDRA-18999

Closes #2967
2024-01-10 11:14:49 -05:00
Caleb Rackliffe d5cea135c9 Revert unnecessary read lock acquisition when reading ring version in TokenMetadata introduced in CASSANDRA-16286
patch by Caleb Rackliffe; reviewed by Francisco Guerrero for CASSANDRA-19107
2024-01-09 12:23:13 -06:00
Yifan Cai 50273d98e4 Support max SSTable size in sorted CQLSSTableWriter
patch by Yifan Cai; reviewed by Alex Petrov, Francisco Guerrero, Maxwell Guo for CASSANDRA-18941
2023-11-30 17:39:00 +08:00
Szymon Miężał 9affcf169f
Fix nodetool repair_admin summarize-pending command to not throw exception
Fixed a bug causing the `OpenDataException` being thrown
when executing the `repair_admin summarize-pending` command.
This patch addresses the problem by including a missing composite
in `PendingStats.toComposite`, ensuring proper data conversion.

patch by Szymon Miezal; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-19014
2023-11-29 18:32:53 +01:00
dmi0 0f2af6ab3f
Fix cassandra-stress in simplenative mode with prepared statements
patch by Dmitry Bychkov; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18744
2023-11-29 17:45:15 +01:00
Stefan Miklosovic 8dc32c5dd7
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-11-29 12:12:22 +01:00
Stefan Miklosovic 6d7cd61412
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-11-29 12:11:29 +01:00
Stefan Miklosovic c1b12058e7
Do not set RPC_READY to false on transports shutdown in order to not fail counter updates for deployments with coordinator and storage nodes with transports turned off
This is the follow-up commit of CASSANDRA-18935 where we set RPC_READY to false
when transports were shut down in runtime. The problem is that the current logic in StorageProxy.findSuitableEndpoint method,
used for the selection of a leader for counter mutations, is filtering out all endpoints which do not have RPC_READY
set to true. Hence, if there is a deployment of a coordinator node (not joining a ring) and storage nodes which
have transports turned off (e.g. for security reasons), then a coordinator node will select no endpoint as a
counter mutation leader which renders counter mutations impossible.

This change just reverts the original fix which was setting RPC_READY to false when transports were shut down in runtime
(e.g. by nodetool disablebinary).

For trunk (to be 5.1 at time of writing this), there is already TCM in place and the correct fix yet to be implemented
is to decouple from checking RCP_READY state and base it e.g. on JOINED state from TCM perspective. Please follow
CASSANDRA-19103 where this will be addressed.

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18935
2023-11-29 12:09:59 +01:00
Jacek Lewandowski dece96f21d Fix filtering system ks sstables for relocation on startup
Patch by Jacek Lewandowski; reviewed by Benjamin Lerer for CASSANDRA-18963
2023-11-28 14:20:26 +01:00
Ekaterina Dimitrova 55fecfb65e Fix BulkLoaderTest.testBulkLoader_WithArgs2
patch by Ekaterina Dimitrova; reviewed by Michael Semb Wever and Andres de la Pena for CASSANDRA-19000
2023-11-20 15:56:50 -05:00
Stefan Miklosovic 7fdb88d10a
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-11-20 10:29:09 +01:00
Stefan Miklosovic 13d44774a1
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-11-20 10:28:23 +01:00
Stefan Miklosovic 8c69f85502
ninja fix CASSANDRA-19002: Set gcgs in HintsMaker to Integer.MAX_VALUE
HintsMaker was creating hint files which ttl'ed after 10 days which started to fail the tests.
By setting it explicitly to Integer.MAX_VALUE, newly generated hint files will expire in cca 68 years.

Branches 3.0 to trunk introduce the fix to HintsMaker. Branches 5.0 and trunk contain regenerated hint files as well.
2023-11-20 10:26:59 +01:00
Bereng 3ba6de70c7 Test failure: org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest
patch by Berenguer Blasi; reviewed by Andres de la Peña for CASSANDRA-18948
2023-11-20 07:34:57 +01:00
Abe Ratnofsky fe1be800b4
Remove completed coordinator sessions
patch by Abe Ratnofsky; reviewed by Caleb Rackliffe, Marcus Eriksson for CASSANDRA-18903
2023-11-13 15:17:47 +01:00
Isaac Reath 26a7d574f0
Make StartupConnectivityChecker only run a connectivity check if there are no nodes which are running a version prior to Cassandra 4
patch by Isaac Reath; reviwed by Paulo Motta, Stefan Miklosovic for CASSANDRA-18968
2023-11-10 11:23:23 +01:00
Stefan Miklosovic ac8a8687a3
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-11-08 14:17:42 +01:00
Stefan Miklosovic 997ad8e03b
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-11-08 14:14:58 +01:00
Stefan Miklosovic 359700dde2
Create / update tests to ensure commit logs and hints for all versions in MessagingService are ingestible by 5.0
Patches for 3.0, 3.11, 4.0 and 4.1 are just adding HintsMaker class to generate hint files.
Patches for 5.0 and trunk are adding tests for commit log upgrading and hints which were generated by HintsMaker.

Patches for 5.0 and trunk are also adding version 1 in HintsDescriptor back as it was removed in CASSANDRA-18314 by mistake.

patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-19002
2023-11-08 14:07:26 +01:00
Jacek Lewandowski 86e07595f7 Retrieve keyspaces metadata and schema version concistently in DescribeStatement
The fix makes the DescribeStatement to wait for the in-progress schema transformations to finish before returning the first page. This way, the metadata and schema version encoded in the result set metadata are guaranteed to be consistent.

Patch by Jacek Lewandowski; reviewed by Benjamin Lerer, Ekaterina Dimitrova for CASSANDRA-18921
2023-10-31 11:15:43 +01:00
Mike Adamson 9697be1131 Fix dtests returning ordering columns that have not been selected
patch by Mike Adamson; reviewed by adelapena, brandonwilliams and
Jeremiah Jordan for CASSANDRA-18892
2023-10-30 08:14:09 -05:00
Stefan Miklosovic d6fcca95b4
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-10-24 16:20:31 +02:00
Stefan Miklosovic 3987160bb2
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-10-24 16:14:49 +02:00
Stefan Miklosovic b51ee83a29
Fix nodetool enable/disablebinary to correctly set rpc readiness in gossip
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18935
2023-10-24 16:12:37 +02:00