Commit Graph

14593 Commits

Author SHA1 Message Date
Sam Tunnicliffe 0b6ae2673e
Minimize expensive reads during authz flow in 3.0/3.11
Patch by Sam Tunnicliffe; reviewed by Francisco Guerrero for CASSANDRA-20293
2025-02-05 14:25:19 -08:00
Sam Tunnicliffe f33267c8fa 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

Co-authored-by: Francisco Guerrero <frankgh@apache.org>
2025-01-17 09:02:35 +00:00
Ke Han f41c2e29d2
Fix incorrect column identifier bytes problem when renaming a column
patch by Ke Han; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18956
2025-01-09 17:35:27 +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
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
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
Mick Semb Wever ce49e775f7
Missing license info and headers
patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-18807
2023-08-31 22:30:42 +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
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
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 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
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 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 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
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 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
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
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
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
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
Brandon Williams e7f55ab8c3 switch to SafeConstructor
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-18150
2023-01-24 06:27:29 -06:00
German Eichberger 8ecd7616fe Default role is created with zero timestamp
patch by German Eichberger; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-12525

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2023-01-18 14:56:22 +01:00
Marcus Eriksson 730b898b74 Don't group TWCS sstables for anticompaction
Patch by marcuse; reviewed by Aleksey Yeschenko for CASSANDRA-17970
2022-12-23 13:38:53 +01:00
Stefan Miklosovic f55b2fb1b3 Do not spam the logs with MigrationCoordinator not being able to pull schemas
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18096
2022-12-20 09:59:28 +01:00
Yifan Cai 473656c1d5 Fix incorrect resource name in LIST PERMISSION output
patch by Yifan Cai; reviewed by Berenguer Blasi, Sam Tunnicliffe for CASSANDRA-17848
2022-12-05 18:48:36 -08:00
Jordan West 13d495aa7d fix intermittent failures in nodetool toppartitions caused by failure to validate invalid bytes
Patch by Jordan West; Reviewed by Brandon Williams and Cheng Wang for CASSANDRA-17254
2022-11-29 18:25:04 -08:00
Abe Ratnofsky b2660bcf78
Fix JMX security vulnerabilities
patch by Abe Ratnofsky; reviewed by Jon Meredith, Mick Semb Wever, Sam Tunnicliffe for CASSANDRA-17921
2022-10-18 22:47:49 +02:00
Jacek Lewandowski a78db628b0 Fix scrubber falling into infinite loop
Fixes scrubber falling into infinite loop when the last partition is broken in data file and compression is enabled.

Patch by Jacek Lewandowski, reviewed by Brandon Williams, for CASSANDRA-17862
2022-08-26 17:06:10 +02:00
Runtian Liu 299bfaed35 Fix missing state resetting on CompressedRandomAccessReader read errors
patch by Runtian Liu; reviewed by Andrés de la Peña and Berenguer Blasi for CASSANDRA-17314
2022-08-08 13:52:10 +01:00
Stefan Miklosovic a7b53217bd fix restarting of services on gossipping-only member
patch by Stefan Miklosovic; reviewed by Brandon Williams (CASSANDRA-17752)
2022-07-27 14:13:25 +02:00
Andrés de la Peña 09692d5a58 Fix writetime and ttl functions forbidden for collections instead of multicell columns
patch by Andrés de la Peña; reviewed by Berenguer Blasi for CASSANDRA-17628
2022-06-27 15:09:35 +01:00
David Capwell fb8bf30c6d jvm-dtest upgrade failures due to 3.x Ping not allowing serialize
patch by David Capwell; reviewed by Jon Meredith for CASSANDRA-17660
2022-05-25 14:00:14 -07:00
Doug Rohrer ffc4c89c3d Fix issue where frozen maps may not be serialized in the correct order
patch by Doug Rohrer, Francisco Guerrero and Yifan Cai; reviewed by Andrés de la Peña and Caleb Rackliffe for CASSANDRA-17623

Co-authored-by: Doug Rohrer <drohrer@apple.com>
Co-authored-by: Francisco Guerrero <frank.guerrero@gmail.com>
Co-authored-by: Yifan Cai <ycai@apache.org>
2022-05-20 11:38:19 +01:00
Maciej Sokol 5d427ff6e5 Fsync TOC and Digest files after they're written
Patch by Maciej Sokol; reviewed by brandonwilliams and bereng for
CASSANDRA-10709
2022-05-13 06:41:07 -05:00
Jermy Li 61d4cccb0b Fix URISyntaxException in nodetool with updated Java
Patch by Jermy Li; reviewed by bereng and brandonwilliams for
CASSANDRA-17581
2022-05-05 05:53:47 -05:00
Jon Meredith 2fdbda6ac9 Schema mutations may not be completed on drain
patch by Jon Meredith; reviewed by Caleb Rackliffe for CASSANDRA-17524
2022-04-27 11:59:47 -06:00
Ekaterina Dimitrova fb66800a00 Fix data corruption in AbstractCompositeType due to static boolean byte buffers
patch by Stefania Alborghetti and Marcus Eriksson; reviewed by Marcus Eriksson, Benjamin Lerer and Ekaterina Dimitrova for CASSANDRA-14752

Co-authored-by: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Co-authored-by: Marcuse Eriksson <marcuse@apache.orgp>
2022-04-17 14:02:49 -04:00
Jon Meredith 647ec92db1 ConnectionLimitHandler may leaks connection count if remote connection drops
patch by Jon Meredith; reviewed by Caleb Rackliffe for CASSANDRA-17252
2022-03-19 08:00:58 -06:00
Maciej Sokol c52b5ab95c Disallow CONTAINS for UPDATE and DELETE
patch by Maciej Sokol; reviewed by Andres de la Peña and Benjamin Lerer for CASSANDRA-15266
2022-03-10 13:05:42 +00:00
Stefan Miklosovic 4a15c5ad5a filter out NULL_VERSION entries from peers table in ConfiguredLimit
patch by Stefan Miklosovic; reviewed by Brandon Williams and Sam Tunnicliffe for CASSANDRA-16518
2022-03-08 18:10:51 +01:00
Marcus Eriksson b58a5c86e8 LeveledCompactionStrategy disk space check improvements
Patch by marcuse; reviewed by Caleb Rackliffe for CASSANDRA-17272
2022-02-17 10:25:43 +01:00
Marcus Eriksson 85c202d8a8 Lazy transaction log replica creation allows incorrect replica content divergence during anticompaction
Patch by marcuse; reviewed by Caleb Rackliffe for CASSANDRA-17273
2022-02-16 10:12:14 +01:00
Marcus Eriksson 5c9ba06dd3 Extend operator control over the UDF threading model
Patch by marcuse; reviewed by Sam Tunnicliffe and Benedict Elliott Smith for CASSANDRA-17352
2022-02-07 12:59:39 +01:00
Alex Petrov 242f7f9b18 Fix Prepared Statements behaviours after 15252
Patch by Alex Petrov; reviewed by Marcus Eriksson for CASSANDR-17248.

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
2022-02-07 11:06:14 +01:00
Jon Meredith 9ff28fc717 Fixes for intermittent in-JVM dtest failures
patch by Jon Meredith, Caleb Rackliffe, Marcus Eriksson, Benedict Elliott Smith <benedict@apache.org>; reviewed by Caleb Rackliffe for CASSANDRA-17256
2022-02-03 14:22:46 -07:00
Andrés de la Peña 40bf53359c Fix conversion from megabits to bytes in streaming rate limiter
patch by Andrés de la Peña; reviewed by Berenguer Blasi for CASSANDRA-17243
2022-01-26 11:34:51 +00:00
Marcus Eriksson b1a8a56c56 Avoid race in AbstractReplicationStrategy endpoint caching
Patch by marcuse; reviewed by Alex Petrov and Jon Meredith for CASSANDRA-16673

Co-authored-by: Jon Meredith <jonmeredith@apache.org>
2022-01-17 14:06:25 +01:00
Venkata Harikrishna Nukala 1911a887e8 Fix slow keycache load which blocks startup for tables with many sstables.
Patch by Venkata Harikrishna Nukala; reviewed by Marcus Eriksson and Joseph Lynch for CASSANDRA-14898
2021-12-09 10:14:16 -05:00
Aleksey Yeschenko 58c878e3e0 Fix rare NPE caused by batchlog replay / node decomission races
pach by Aleksey Yeschenko; reviewed by Alex Petrov for CASSANDRA-17049
2021-11-12 14:31:17 +00:00