Commit Graph

18611 Commits

Author SHA1 Message Date
Paulo Motta 3d1b981d89 Merge branch 'cassandra-4.0' into cassandra-4.1
Closes #2968
2024-01-10 11:18:34 -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 4dd69dc62d Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Revert unnecessary read lock acquisition when reading ring version in TokenMetadata introduced in CASSANDRA-16286
2024-01-09 14:53:51 -06: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
Jacek Lewandowski 3edca0041c Memoize Cassandra verion and add a backoff interval for failed schema pulls
Also, fixes MigrationCoordinatorTest and adds version assertions to Instance.startup

Patch by Jacek Lewandowski; reviewed by Ekaterina Dimitrova for CASSANDRA-18902
2023-12-22 11:49:19 +01:00
Abe Ratnofsky a443990bfa Fix StackOverflowError on ALTER after many previous schema changes
Fix re-wrapping of TableMetadataRefCache fields in
Collections.UnmodifiableMap, which was causing long reference chains
where the underlying map was another instance of an UnmodifiableMap.
Calls to `get` had to traverse all the way down the chain, and would
eventually overflow the stack (and created a fair bit of extra garbage
on the heap).

Patch by Abe Ratnofsky; reviewed by Caleb Rackliffe, Jacek Lewandowski for CASSANDRA-19166
2023-12-06 18:05:47 +01:00
Yifan Cai 350e968565 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-30 17:44:07 +08: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
Stefan Miklosovic df64a5aa0d
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-29 18:34:05 +01: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
Stefan Miklosovic c8d6182148
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-29 12:12:56 +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 78dd963481 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix filtering system ks sstables for relocation on startup
2023-11-28 14:21:16 +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
Bereng 6cac24f581 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Test failure: org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest
2023-11-20 07:36:52 +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
Stefan Miklosovic afb422ddc0
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-13 15:20:35 +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
Stefan Miklosovic a5299bb453
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-10 11:24:44 +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
Jacek Lewandowski 9ad5ec9664 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Retrieve keyspaces metadata and schema version concistently in DescribeStatement
2023-10-31 11:15:44 +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
Stefan Miklosovic d6bf4fd98f
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-10-24 16:26:07 +02: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
Jacek Lewandowski ac71d0f56e Fixed the inconsistency between distributedKeyspaces and distributedAndLocalKeyspaces
Patch by Jacek Lewandowski; reviewed by Benjamin Lerer, Berenguer Blasi, Ekaterina Dimitrova, Jeremiah Jordan for CASSANDRA-18747
2023-10-19 12:56:09 +02:00
David Capwell 1920571861 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-10-10 14:07:17 -07: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 ea6461b870
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-10-10 10:04:42 +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
Jacek Lewandowski 59790da813 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix closing iterator in SecondaryIndexBuilder
2023-10-05 15:33:30 +02:00
Jacek Lewandowski 016d91a7d7 Fix closing iterator in SecondaryIndexBuilder
Patch by Jacek Lewandowski; reviewed by Andres de la Peña, Piotr Kolaczkowski for CASSANDRA-18361
2023-10-05 15:33:28 +02:00
Jacek Lewandowski 29c3136763 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix CQLConnectionTest and SimpleClient
2023-10-04 18:45:52 +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
Stefan Miklosovic 4974a8237c
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-10-02 13:18:40 +02:00
Cameron Zemek cb1f1399b1
Improve performance of compactions when table does not have an index
patch by Cameron Zemek; reviewed by Branimir Lambov, Stefan Miklosovic for CASSANDRA-18773
2023-10-02 13:16:39 +02:00
Jon Meredith b9586501a6 Internode legacy SSL storage port certificate is not hot reloaded on update
patch by Jon Meredith; reviewed by Dinesh Joshi, Francisco Guerrero for CASSANDRA-18681
2023-09-25 14:25:14 -06:00
Branimir Lambov db6641fbb6 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-09-21 16:59:04 +03: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 b8209a06fb Merge branch 'cassandra-4.0' into cassandra-4.1 2023-09-15 12:28:11 -05:00
Brandon Williams edde699a06 Merge branch 'cassandra-3.11' into cassandra-4.0 2023-09-15 12:23:59 -05:00
Brandon Williams edf22ed776 Revert 18543 but retain properties
Patch by brandonwilliams; reviewed by dcapwell for CASSANDRA-18854
2023-09-15 12:22:10 -05:00
Brandon Williams 725655dda2 Nodetool paxos-only repair is no longer incremental
Patch by Ningzi Zhan; reviewed by brandonwilliams, jlewandowski, and
Maxwell Guo for CASSANDRA-18466
2023-09-08 09:05:07 -05:00
Stefan Miklosovic d4cb791bdd
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-31 10:35:42 +02:00
Stefan Miklosovic 94043fa9c6
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-08-31 10:34:02 +02:00
Stefan Miklosovic be0c563097
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-08-31 10:30:51 +02:00
Stefan Miklosovic 8bbf92a670
Refactor validation logic in StorageService.rebuild
patch by Stefan Miklosovic; reviewed by Ariel Weisberg for CASSANDRA-18803
2023-08-31 09:54:57 +02:00
Jon Meredith bde4fa0013 Waiting indefinitely on ReceivedMessage response in StreamSession#receive() can cause deadlock
patch by Jon Meredith; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-18733
2023-08-29 10:42:03 -06:00
Andy Tolbert b47bee42d3
Allow empty keystore_password in encryption_options
patch by Andy Tolbert; reviewed by Jon Meredith and Stefan Miklosovic for CASSANDRA-18778
2023-08-28 09:47:54 +02:00
Jon Meredith ac3b356063 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-24 16:43:53 -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 8666265521
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-23 15:37:53 +02: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 7c7d8f4414
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-21 15:58:04 +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 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
Brandon Williams cd3e564fb2 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-18 05:11:33 -05:00
Brandon Williams fb395c6b8b Merge branch 'cassandra-3.11' into cassandra-4.0 2023-08-18 05:11:06 -05:00
Brandon Williams c870641475 Merge branch 'cassandra-3.0' into cassandra-3.11 2023-08-18 05:09:56 -05:00
Brandon Williams fd9f07dab8 Add speculative retries to tablestats
Patch by brandonwilliams; reviewed by bereng and Maxwell Guo for
CASSANDRA-18767
2023-08-18 05:07:08 -05:00
Brandon Williams 2f0adfac2b Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-02 10:45:18 -05:00
Saran Vinaiyak 8b331ddb4d Fix NTS log message when an unrecognized strategy option is passed
Patch by Saran Vinaiyak; reviewed by brandonwilliams and edimitrova for
CASSANDRA-18679
2023-08-02 10:42:58 -05:00
Francisco Guerrero 9c796dfb27 Skip ColumnFamilyStore#topPartitions initialization when client or tool mode
This commit skips the initialization of `topPartitions` in `org.apache.cassandra.db.ColumnFamilyStore`
when running in client or tool mode. The `TopPartitionTracker` class will attempt to query the system
keyspace, which when running in client or tool mode will not be part of the KeyspaceMetadata. This
causes a warning to be printed out with a stacktrace that can be misleading. The warning is similar to
this:

```
WARN org.apache.cassandra.db.SystemKeyspace: Could not load stored top SIZES partitions for ...
org.apache.cassandra.db.KeyspaceNotDefinedException: keyspace system does not exist
        at org.apache.cassandra.schema.Schema.validateTable(Schema.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.QueryProcessor.parseAndPrepare(QueryProcessor.java:xxx) ~[?:?]
        ...
```

In this commit, we check whether we run in client or tool mode, and skip initialization
of `topPartitions` in those cases.

Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRA-18697
2023-08-01 13:14:40 -07:00
Ekaterina Dimitrova fb7e4e7c48 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-01 13:59:52 -04:00
Daniel Jatnieks 4a2a585ec0 Fix BulkLoader ignoring cipher suites options.
patch by Dan Jatnieks; reviewed by Ekaterina Dimitrova and Jon Meredith for CASSANDRA-18582
2023-08-01 13:49:29 -04:00
Stefan Miklosovic 778f9f3ed5
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-07-28 17:11:15 +02:00
Stefan Miklosovic a0fdda1976
Remove AssertJ from the production code
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18700
2023-07-28 17:09:52 +02:00
Stefan Miklosovic d320cef8f9
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-07-12 12:21:03 +02:00
Stefan Miklosovic 92c0459199
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-07-12 12:20:00 +02:00
Stefan Miklosovic 7ec5126870
Fix CAST function for float to decimal
patch by Stefan Miklosovic; reviewed by Andres de la Peña and Brandon Williams for CASSANDRA-18647
2023-07-12 12:18:46 +02:00
Brandon Williams 461987627b Merge branch 'cassandra-4.0' into cassandra-4.1 2023-07-10 10:05:21 -05:00
Brandon Williams 6fa548f9e9 Revert "Allow internal address to change with reconnecting snitches"
This reverts commit b791644fda.

Patch by brandonwilliams; reviewed by bereng for CASSANDRa-18560
2023-07-10 10:04:32 -05:00
Stefan Miklosovic d2ad51c2f6
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-07-04 13:46:51 +02:00
Stefan Miklosovic 0a53770ddc
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-07-04 13:45:30 +02:00
Vincent White 028ea02a4a
Remove unrepaired SSTables from garbage collection when only_purge_repaired_tombstones is true
patch by Vincent White; reviewed by Stefan Miklosovic and Branimir Lambov for CASSANDRA-14204

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2023-07-04 10:37:29 +02:00
Caleb Rackliffe c3327855e4 Add a virtual table that exposes currently running queries
patch by Chris Lohfink; reviewed by Caleb Rackliffe and Benedict Elliott Smith for CASSANDRA-15241

Co-authored-by: Chris Lohfink <clohfink@apple.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
2023-06-28 14:27:37 -05:00
Stefan Miklosovic a57f0396fa
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-28 16:33:08 +02:00
Stefan Miklosovic b099aae3f0
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-06-28 16:27:19 +02:00
Stefan Miklosovic b6fdc80456
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-06-28 16:20:05 +02:00
Stefan Miklosovic 4ea7bb25b4
Add support for AWS Ec2 IMDSv2
patch by Stefan Miklosovic; reviewed by Jacek Lewandowski and Brandon Williams for CASSANDRA-16555

Co-authored-by: Jacek Lewandowski <lewandowski.jacek@gmail.com>
Co-authored-by: Paul Rütter <paul@blueconic.com>
2023-06-28 16:08:39 +02:00
Stefan Miklosovic 0dd69ab854
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-26 14:09:29 +02:00
Stefan Miklosovic 04fd3747cf
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-06-26 14:06:40 +02:00
Stefan Miklosovic 55dc5b43f1
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-06-26 14:01:24 +02:00
Stefan Miklosovic a00d1de441
Pass taskId from CompactionTask to system.compaction_history
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-12183
2023-06-26 13:55:49 +02:00
Stefan Podkowinski e67fa69114 Remove hard-coded SSL cipher suites and protocols
patch by Stefan Podkowinski; reviewed by Robert Stupp for CASSANDRA-10508

backported in CASSANDRA-18575 by German Eichberger; reviewed by
brandonwilliams
2023-06-21 06:25:18 -05:00
Stefan Miklosovic 579c724adf
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-19 17:12:48 +02:00
Maciej Sokol 92d0a40c96
Fix assertion error when describing mv as table
patch by Maciej Sokol; reviewed by Brandon Williams and Stefan Miklosovic for CASSANDRA-18596
2023-06-19 17:08:12 +02:00
Stefan Miklosovic 2b98d487d0
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-15 13:19:56 +02:00
Stefan Miklosovic 49dba85ec8
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-06-15 13:16:44 +02:00
Cameron Zemek 64d953fdca
Wait for live endpoints in gossip waiting to settle
patch by Cameron Zemek; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18543
2023-06-15 12:59:13 +02:00
Brandon Williams 1f6b37d189 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-14 11:35:40 -05:00
Brandon Williams 2fcdaa5b76 Merge branch 'cassandra-3.11' into cassandra-4.0 2023-06-14 11:35:22 -05:00
ningzi.zhan 1eccb2bc1f Fix error message handling when trying to use CLUSTERING ORDER with non-clustering column
Patch by Ningzi Zhan and Tomasz Lasica; reviewed by brandonwilliams,
edimitrova and Maxwell Guo for CASSANDRA-17818

Co-Authored-By: Tomek Lasica <tomasz.lasica@datastax.com>
2023-06-14 11:34:03 -05:00
Jacek Lewandowski b0cf9ba219 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Track the amount of read data per row
2023-06-12 11:26:03 +02:00
Jacek Lewandowski 5143bd81e8 Track the amount of read data per row
If an sstable is corrupted in a nasty way, we may read invalid cell sizes and try to read much more data for a row than we should. In rare scenarios this can lead even to OOMs.

This simple fix adds tracking and limiting the amount of data that is read per row. Row has its size stored in preamble which can be used as a limit. If the deserialization code tries to read more than that, it will simply fail with EOF which will prevent more serious problems later.

Patch by Jacek Lewandowski; reviewed by Berenguer Blasi and Maxwell Guo for CASSANDRA-18513

# Conflicts:
#	src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
2023-06-12 11:26:02 +02:00
Stefan Miklosovic 867c074dda
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-06 16:17:57 +02:00
Stefan Miklosovic f368b9dc1e
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-06-06 16:14:34 +02:00
mghildiy 03da864bab
Add keyspace and table name to exception message during ColumnSubselection deserialization
patch by Manish Ghildiyal; reviewed by Brandon Williams and Stefan Miklosovic for CASSANDRA-18346
2023-06-06 16:00:26 +02:00
Stefan Miklosovic aa7ed179d3
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-05 15:58:04 +02:00
rgitt 5655a33bc0
Fix Down nodes counter in nodetool describecluster
patch by Goel Ranju; reviewed by Brandon Williams and Stefan Miklosovic for CASSANDRA-18512
2023-06-05 15:56:38 +02:00
Jon Meredith 208a71c008 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-31 12:12:50 -06:00
Jon Meredith 57293e8281 Merge branch 'cassandra-3.11' into cassandra-4.0 2023-05-31 12:04:29 -06:00
Doug Rohrer 43ec184391 Add support for JMX in the in-jvm dtest framework
patch by Doug Rohrer; reviewed by Alex Petrov, Jon Meredith, Francisco Guerrero Hernandez for CASSANDRA-18511
2023-05-31 12:02:26 -06:00
Stefan Miklosovic 441285d58e
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-30 22:19:11 +02:00
Stefan Miklosovic f66adb0278
Remove unnecessary shuffling of GossipDigests in Gossiper#makeRandomGossipDigest
This patch also fixes the bug when creating GossipDigests in case epState in
Gossiper#makeRandomGossipDigest was null. Previously, if it was null, it used
generation and maxVersion of the last non-null epState instead of zeros.

patch by Cameron Zemek; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18546
2023-05-30 21:44:07 +02:00
Marcus Eriksson 72fc04d238 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-25 08:43:15 +02:00
Marcus Eriksson aafb4d1944 Improve nodetool enable{audit,fullquery}log
Patch by marcuse; reviewed by Dinesh Joshi and Mick Semb Wever for CASSANDRA-18550
2023-05-25 08:41:12 +02:00
Brandon Williams 93efe0ee04 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-24 09:37:11 -05:00
ningzi.zhan 54528bff20 Report network cache info in nodetool
Patch by Ningzi Zhan; reviewed by brandonwilliams and smiklosovic for
CASSANDRA-18400
2023-05-24 09:36:32 -05:00
Stefan Miklosovic 621faf7740
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-18 22:37:44 +02:00
Stefan Miklosovic ff820290dd
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-05-18 22:37:07 +02:00
Ivan Senic 3ca94d65d3
Remove unnecessary String.format invocation in QueryProcessor when getting a prepared statement from cache
patch by Ivan Senic; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-17202
2023-05-18 22:36:27 +02:00
David Capwell 446a9d1d01 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-18 10:38:00 -07:00
Tobias Lindaaker 1053e3b475 Partial compaction can resurrect deleted data
patch by Tobias Lindaaker, Marcus Eriksson; reviewed by David Capwell, Marcus Eriksson for CASSANDRA-18507
2023-05-18 10:34:45 -07:00
Stefan Miklosovic 402e2f2f73
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-17 12:04:24 +02:00
Stefan Miklosovic 2bb634a339
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-05-17 12:02:37 +02:00
Stefan Miklosovic f5c42f428c
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-05-17 12:01:35 +02:00
Stefan Miklosovic b8e21fb80a
Validate the existence of a datacenter in nodetool rebuild
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-14319
2023-05-17 12:00:19 +02:00
Brandon Williams 67d73469b4 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-16 09:01:21 -05:00
Brandon Williams b791644fda Allow internal address to change with reconnecting snitches
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-16718
2023-05-16 09:00:14 -05:00
Stefan Miklosovic d7917a5144
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-11 15:58:49 +02:00
Bernardo Botella Corbi 75194201f1
Fix quoting in toCqlString methods of UDTs and aggregates
patch by Bernardo Botella Corbi, reviewed by Stefan Miklosovic, Benjamin Lerer and Yifan Cai for CASSANDRA-17918
2023-05-11 15:48:21 +02:00
Jon Meredith 7f4e9bb67b Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-09 17:55:24 -06:00
Jon Meredith ae995eb3d3 NPE when deserializing malformed collections from client
patch by Jon Meredith; reviewed by Caleb Rackliffe for CASSANDRA-18505
2023-05-09 17:47:49 -06:00
Mick Semb Wever 82dc54c3a8
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Improve 'Not enough space for compaction' logging messages
2023-05-04 12:25:00 +02:00
Henrik Ingo 65c99bfc42
Improve 'Not enough space for compaction' logging messages
Adds separate WARN level messages to the check itself in Directories.

 patch by Henrik Ingo; reviewed by Mick Semb Wever, Brad Schoening, Claude Warren, Kan Maung, maxwellguo  for CASSANDRA-18260
2023-05-04 12:23:00 +02:00
Stefan Miklosovic ba72d90141
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-04-27 11:20:09 +02:00
Stefan Miklosovic c4a305d17a
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-04-27 11:18:37 +02:00
Stefan Miklosovic c74c9bb037
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-04-27 11:16:41 +02:00
Stefan Miklosovic db78e746d7
Do not remove SSTables when cause of FSReadError is OutOfMemoryError while using best_effort disk failure policy
patch by Stefan Miklosovic; reviewed by Brandon Williams and Maxwell Guo for CASSANDRA-18336
2023-04-27 10:47:07 +02:00
Stefan Miklosovic e733edb6cc
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-04-26 13:43:19 +02:00
Stefan Miklosovic 5bcee5c06a
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-04-26 13:41:02 +02:00
Stefan Miklosovic 81e78192cb
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-04-26 13:36:40 +02:00
Stefan Miklosovic 4f348786bd
Do not remove truncated_at entry in system.local while dropping an index
patch by Stefan Miklosovic; reviewed by Caleb Rackliffe for CASSANDRA-18105
2023-04-26 11:00:06 +02:00
Jon Meredith 1d926e8c6f Merge branch 'cassandra-4.0' into cassandra-4.1 2023-04-25 12:08:39 -06:00
Jon Meredith 09c1e67598 Incremental repairs fail on mixed IPv4/v6 addresses serializing SyncRequest
patch by Jon Meredith; reviewed by Caleb Rackliffe for CASSANDRA-18474
2023-04-25 12:00:26 -06:00
Jon Meredith 4c13df58cb Merge branch 'cassandra-4.0' into cassandra-4.1 2023-04-21 10:55:55 -06:00
Jon Meredith cd9bed0aea Deadlock updating sstable metadata if disk boundaries need reloading
patch by Jon Meredith; reviewed by Marcus Eriksson for CASSANDRA-18443
2023-04-21 10:47:55 -06:00
Andrés de la Peña 2208235ce9 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-04-17 14:50:18 +01:00
Andrés de la Peña 3f67827387 Merge branch 'cassandra-3.11' into cassandra-4.0 2023-04-17 14:48:27 +01:00
Andrés de la Peña 08b9471a1e Fix sstable_count metric missing from tablestats json/yaml output
patch by Andrés de la Peña; reviewed by Brandon Williams and Ekaterina Dimitrova for CASSANDRA-18448
2023-04-17 14:36:01 +01:00
Maulin Vasavada bd49f6ff26
Allow keystore and truststore passwords to be nullable
patch by Maulin Vasavada; reviewed by Stefan Miklosovic and Caleb Rackliffe for CASSANDRA-18124
2023-04-14 14:02:51 +02:00
Stefan Miklosovic 5869dc0dac
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-04-14 11:49:08 +02:00
Maciej Sokol 2fce3025c4
Fix nested selection of reversed collections
patch by Maciej Sokol; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-17913
2023-04-14 11:33:46 +02:00
Josh McKenzie 085765a07c Merge branch 'cassandra-4.0' into cassandra-4.1 2023-04-03 16:12:59 -04:00
Josh McKenzie f6fce7ab51 Improve debuggability and correctness of ref detection
This patch is a backport of CASSANDRA-17205 and also raises
logging level to 'error' from 'warn' in StrongLeakDetector.

Patch by jmckenzie; reviewed by smiklosovic for CASSANDRA-18332
2023-04-03 16:03:33 -04:00
Caleb Rackliffe 853ae8c840 Avoid loading the preferred IP for BulkLoader streaming
patch by Caleb Rackliffe; reviewed by Jon Meredith for CASSANDRA-18370

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Jon Meredith <jonmeredith@apache.org>
2023-03-31 11:57:29 -05:00
Jacek Lewandowski 14936d0bd3 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Save host id to system.local and flush immediately after startup
2023-03-31 17:34:19 +02:00
Jacek Lewandowski 4b9c18235a Merge branch 'cassandra-3.11' into cassandra-4.0
* cassandra-3.11:
  Save host id to system.local and flush immediately after startup
2023-03-31 17:30:20 +02:00
Jacek Lewandowski ee586b53c2 Merge branch 'cassandra-3.0' into cassandra-3.11
* cassandra-3.0:
  Save host id to system.local and flush immediately after startup
  Remove asf.yaml from non-trunk branches
  Notify the corresponding JIRA issue as soon as the PR is raised
2023-03-31 17:30:19 +02:00
Jacek Lewandowski f96659c530 Save host id to system.local and flush immediately after startup
patch by Adriano Bonacin and Jacek Lewandowski; reviewed by Stefan Miklosovic and Sam Tunnicliffe for CASSANDRA-18153
2023-03-31 17:30:18 +02:00
Stefan Miklosovic 6f401a8725
Return snapshots with dots in their name in nodetool listsnapshots
patch by Stefan Miklosovic; reviewed by Paulo Motta for CASSANDRA-18371
2023-03-28 19:00:40 +02:00
Stefan Miklosovic 4ac89e6451
Fix NPE when loading snapshots and data directory is one directory from root
patch by Stefan Miklosovic; reviewed by Paulo Motta for CASSANDRA-18359
2023-03-26 23:29:28 +02:00
Paulo Motta 7c2f97cd29 Do not submit hints when hinted_handoff_enabled=false
- Remove dead WriteCallbackInfo code

Patch by Paulo Motta, Aleksey Yeschenko; Reviewed by Stefan Miklosovic, Claude Warren for CASSANDRA-18304

Co-authored-by: Aleksey Yeschenko <aleksey@apache.org>
2023-03-24 12:17:17 -04:00
Jacek Lewandowski 955cf156c8 Merge branch 'cassandra-3.0' into cassandra-3.11
* cassandra-3.0:
  Fix RepairJob unnecessarily reporting cancellation error
2023-03-21 10:08:12 +01:00
Jacek Lewandowski f6a04ca81f Fix RepairJob unnecessarily reporting cancellation error
patch by Jacek Lewandowski; reviewed by Brandon Williams for CASSANDRA-17701
2023-03-21 10:04:24 +01:00
David Capwell d5b1483703 Incompatible file system thrown while running Simulator
patch by David Capwell; reviewed by Brandon Williams, Caleb Rackliffe for CASSANDRA-18320
2023-03-15 16:19:04 -07:00
Jacek Lewandowski deb8abd2fd Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix the ordering of sstables when running sstableupgrade tool
2023-03-14 15:18:37 +01:00
Jacek Lewandowski 5104008db9 Merge branch 'cassandra-3.11' into cassandra-4.0
* cassandra-3.11:
  Fix the ordering of sstables when running sstableupgrade tool
2023-03-14 15:16:22 +01:00
Jacek Lewandowski 58d06d34ab Merge branch 'cassandra-3.0' into cassandra-3.11
* cassandra-3.0:
  Fix the ordering of sstables when running sstableupgrade tool
2023-03-14 15:14:31 +01:00
Claude Warren 8df69c8016 Fix the ordering of sstables when running sstableupgrade tool
patch by Claude Warren; reviewed by Jacek Lewandowski and Stefan Miklosovic for CASSANDRA-18143
2023-03-14 14:52:53 +01:00
Jacek Lewandowski 8ba3888fcf Merge branch 'cassandra-4.0' into cassandra-4.1 2023-03-13 09:57:11 +01:00
Jaroslaw Grabowski 3cfb222122 Fix BufferPool.memoryInUse counter
The counter was incorrectly decremented by the size of the unused portion of the provided buffer.
It is now decremented by the number of bytes actually returned to the pool (that may be different than "size"). The number is calculated as a difference between original and resulting buffer capacity.

patch by Jaroslaw Grabowski <jtgrabowski>, reviewed by Jacek Lewandowski <jacek-lewandowski> for CASSANDRA-18311
2023-03-13 09:51:33 +01:00
Stefan Miklosovic b7eaa2d209
Deprecate org.apache.cassandra.hadoop code
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-16984
2023-03-12 21:34:29 +01:00
Brandon Williams 0ea1d384d4 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-03-09 10:04:31 -06:00
Brandon Williams a874e02eec Merge branch 'cassandra-3.11' into cassandra-4.0 2023-03-09 10:03:14 -06:00
Brandon Williams 326b5aceb1 Merge branch 'cassandra-3.0' into cassandra-3.11 2023-03-09 10:02:21 -06:00
Brandon Williams be574fc34b Fix default file system error handler for disk_failure_policy die
Patch by Runtian Liu; reviewed by brandonwilliams and smiklosovic for
CASSANDRA-18294
2023-03-09 10:00:49 -06:00
Jacek Lewandowski 5f7175d59d Small fixes around Schema management
- Denormalize distributedAndLocalKeyspaces to remove perf degradation
- Set updated schema version once applied

patch by Jacek Lewandowski, reviewed by Stefan Miklosovic for CASSANDRA-18291
2023-03-09 08:12:10 +01:00
Jon Meredith 6adcff8f30 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-03-07 10:36:16 -07:00
Benedict Elliott Smith 40f9ca60f1 Improve memtable allocator accounting when updating AtomicBTreePartition
patch by Benedict Elliott Smith; reviewed by Benjamin Lerer, Jon Meredith for CASSANDRA-18125
2023-03-07 10:28:32 -07:00
Stefan Miklosovic 9860c1e9d9
Fix copying of JAR of a trigger to temporary file
While testing the fix for trigger, we fixed the corresponding
trigger example. While on it, we detected that ssl-factory example was
not working either so it is fixed in this commit as well.

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18264
2023-02-17 16:36:42 +01:00
Stefan Miklosovic cfe9641fbe
Fix possible NoSuchFileException when removing a snapshot
patch by Stefan Miklosovic; reviewed by Jacek Lewandowski for CASSANDRA-18211

Co-authored-by: Jacek Lewandowski <lewandowski.jacek@gmail.com>
2023-02-17 15:42:03 +01:00
Stefan Miklosovic bbe936a236
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-02-07 15:53:51 +01:00
Stefan Miklosovic b8494a8275
Log warning message on aggregation queries without key or on multiple keys
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18219
2023-02-07 15:47:36 +01:00
Brandon Williams 209ba28b4d Merge branch 'cassandra-4.0' into cassandra-4.1 2023-02-02 11:46:31 -06:00
yongj 0c58fbb8dd Add cache type information for maximum memory usage warning message
Patch by Yong Jiang; reviewed by brandonwilliams and smiklosovic for
CASSANDRA-18184
2023-02-02 11:45:52 -06:00
Jacek Lewandowski dcc19cf865 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-02-01 09:47:12 +01:00
Jacek Lewandowski 9bf128aaa3 Improve unit tests performance
- Don't flush schema on every schema update in unit tests
- Use unix command to delete test data
- Shorten teardown
- Stable processor count presented by JMX on Jenkins, CircleCI and local

Patch by <jacek-lewandowski>, reviewed by <michaelsembwever> and <josh-mckenzie> for CASSANDRA-17427
2023-02-01 09:40:50 +01:00
Brandon Williams 5dbeee258c Merge branch 'cassandra-4.0' into cassandra-4.1 2023-01-30 07:05:42 -06:00
Maciej Sokol 0b7e3a8ee7 Connect to listen address when own broadcast address is requested
Patch by Maciej Sokol; reviewed by brandonwilliams and smiklosovic for
CASSANDRA-18200
2023-01-30 07:04:41 -06:00
David Capwell 1c71e57f46 PaxosPrepare may add instances to the Electorate that are not in gossip
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-18194
2023-01-27 12:31:02 -08:00
Brandon Williams 53156c24e1 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-01-24 06:34:48 -06:00
Brandon Williams 5f54d64c78 Merge branch 'cassandra-3.11' into cassandra-4.0 2023-01-24 06:32:43 -06:00
Brandon Williams 92245b0f07 Merge branch 'cassandra-3.0' into cassandra-3.11 2023-01-24 06:30:11 -06:00
Brandon Williams e7f55ab8c3 switch to SafeConstructor
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-18150
2023-01-24 06:27:29 -06:00
Paulo Motta da2dd2bfbc Merge branch 'cassandra-4.0' into cassandra-4.1 2023-01-23 17:27:58 -05:00
lzurovchak1 8bb9c72f58 Add safeguard so cleanup fails when node has pending ranges
Patch by Lindsey Zurovchak; Reviewed by Paulo Motta, Stefan Miklosovic for CASSANDRA-16418

Closes #2061
2023-01-23 17:26:47 -05:00
Andrés de la Peña 6c96e2fd41 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-01-23 11:42:24 +00:00