Commit Graph

7016 Commits

Author SHA1 Message Date
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
David Capwell 2bab3f27ba Gossip NPE due to shutdown event corrupting empty statuses
patch by David Capwell; reviewed by Brandon Williams for CASSANDRA-18913
2023-10-10 14:05:15 -07:00
Francisco Guerrero 26c374da4f Synchronize CQLSSTableWriter#build on the Schema.instance object
In this commit the `org.apache.cassandra.io.sstable.CQLSSTableWriter#build` method synchronizes on the
`Schema.instance` object (instead of the `CQLSSTableWriter.class`) to prevent concurrent schema operations
to fail when the offline tools also updates the schema.

For example, a table creation operation, which modifies the keyspace tables metadata, might end up
missing the update when a concurrent call to the `CQLSSTableWriter#build` method is accessing the
singleton Schema instance.

Patch by Francisco Guerrero, reviewed by Yifan Cai, Maxwell Guo, Alex Petrov for CASSANDRA-18317.
2023-10-10 10:46:47 +02:00
Stefan Miklosovic b57c13603a
Remove byteman-related files from production sources
This patch also removes compress-lzf library (leftover from CASSANDRA-12229)
as well as it makes byte-buddy dependencies to be test scoped.

patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-18877
2023-10-10 09:51:11 +02:00
Bereng 9ccec3dc8c Test failure: junit.framework.TestSuite.org.apache.cassandra.distributed.test.CASMultiDCTest
Patch by Berenguer Blasi; reviewed by Ekaterina Dimitrova for CASSANDRA-18707
2023-10-05 09:22:18 +02:00
Jacek Lewandowski 8486d678b0 Fix CQLConnectionTest and SimpleClient
There are a couple of fixes in this patch. As explained on the ticket, some of the flaky failures are a race of two events that cause the termination of the connection. First is a legitimate close as a result of expected failures. In this case, the server sends the error message and closes the connection. The test expects to receive that message. However, the test was sending more messages that couldn't be received because the server already closed the connection, and they were bounced by the OS, causing immediate connection shutdown on the client side, even before it could receive the error message.

The fix is to stop sending the messages after sending the message, which is expected to cause a failure. Some other accompanying modifications include using Awaitility to wait for specific events and consider the configured maximum number of consecutive failures.

Also added some more logging to help investigate failures in the future.

Patch by Jacek Lewandowski; reviewed by Sam Tunnicliffe for CASSANDRA-16949
2023-10-04 18:45:50 +02:00
Jacek Lewandowski 3658ba58c7 JMH improvements - faster build and async profiler
- Don't create uber jar for microbenchmarks
- Add async profiler to jmh tests
- Benchmark classes names validation
- Add jmh.args property to make it possible passing extra args to JMH
- Add missing test/anttasks to idea configuration

Patch by Jacek Lewandowski; reviewed by Branimir Lambov, Maxim Muzafarov, Stefan Miklosovic for CASSANDRA-18871
2023-09-25 12:39:36 +02:00
Branimir Lambov c6385ac3dd Merge branch 'cassandra-3.11' into cassandra-4.0 2023-09-21 16:02:01 +03:00
Ethan Brown 87c2af85c1 Fix delayed SSTable release with unsafe_aggressive_sstable_expiration
patch by Ethan Brown; reviewed by Branimir Lambov and Mick Semb Wever for CASSANDRA-18756
2023-09-21 15:53:27 +03:00
Brandon Williams b2093ef321 Select automatic native port when starting the server in CQLTester
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-18829
2023-09-12 06:11:44 -05:00
Daniel Jatnieks 0b7310c010
Fix FailingRepairTest by making sure Gossip is started before each test
patch by Daniel Jatnieks; reviewed by Brandon Williams and Stefan Miklosovic for CASSANDRA-18366
2023-09-04 10:03:22 +02:00
Francisco Guerrero 6ffa43f68b Support Dynamic Port Allocation for in-jvm dtest framework
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Jon Meredith, Yifan Cai for CASSANDRA-18722
2023-08-28 15:29:14 -06:00
Jon Meredith 4034fbb6dd Merge branch 'cassandra-3.11' into cassandra-4.0 2023-08-24 16:34:44 -06:00
Doug Rohrer c6d7d070c5 IsolatedJMX should not release all TCPEndpoints on instance shutdown
patch by Doug Rohrer; reviewed by Jon Meredith, Stefan Miklosovic for CASSANDRA-18725
2023-08-24 16:32:28 -06:00
Stefan Miklosovic d13b3ef61b
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-08-23 15:33:00 +02:00
Stefan Miklosovic b1b9c04010
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-08-23 15:22:09 +02:00
Roman Mushchinski 4ab31d34c8
Make alternation of a user type validate the same way as creation of a user type does
patch by Roman Mushchinski; reviewed by Stefan Miklosovic and Andres de la Peña for CASSANDRA-18585
2023-08-23 15:07:12 +02:00
Stefan Miklosovic 9d3b148887
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-08-21 15:56:12 +02:00
Claude Warren 998f84a2cb
Fix NPE when using udfContext in UDF after a restart of a node
patch by Claude Warren; reviewed by Stefan Miklosovic and Andres de la Peña for CASSANDRA-18739
2023-08-21 14:44:02 +02:00
Stefan Miklosovic 197e806f64
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-08-18 19:29:47 +02:00
Stefan Miklosovic da3c400675
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-08-18 18:57:59 +02:00
Stefan Miklosovic 65a3d36eb9
Add more tests for CASSANDRA-16905
patch by Stefan Miklosovic; reviewed by Andres de la Peña for CASSANDRA-18760
2023-08-18 18:48:14 +02:00
Stefan Miklosovic a60fb98f65
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-08-18 18:40:12 +02:00
Stefan Miklosovic 141b85cfb7
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-08-18 18:27:43 +02:00
Aleksey Yeschenko f0280fb6f8
Backport of CASSANDRA-16905 Further restrict schema column drop/recreate conversions
patch by Aleksey Yeschenko; reviewed by Blake Eggleston, Sam Tunnicliffe, and Caleb Rackliffe for CASSANDRA-16905

Co-authored by Aleksey Yeschenko (aleksey@apache.org)
Co-authored by Josh McKenzie (jmckenzie@apache.org)
2023-08-18 18:17:01 +02:00