Commit Graph

4629 Commits

Author SHA1 Message Date
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 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
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
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
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 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
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
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 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
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
Stefan Miklosovic 4c8e9097bd
Introduce check for names of test classes
patch by Stefan Miklosovic; reviewed by Berenguer Blasi and David Capwell for CASSANDRA-17943
2023-01-28 16:18:51 +01: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
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
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
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
Jon Meredith ba0555e965 Fix flaky test - org.apache.cassandra.distributed.test.MessageForwardingTest.mutationsForwardedToAllReplicasTest
patch by Jon Meredith; reviewed by David Capwell for CASSANDRA-17583
2022-06-06 11:04:37 -06: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
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
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
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
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
Brandon Williams 28004d9c60 Upgrade logback to 1.2.9
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-17204

includes backported test changes from CASSANDRA-14183
2022-01-20 09:47:11 -06: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
Jon Meredith 071ecb5246 Race in CompactionExecutorTest
patch by Jon Meredith; reviewed by Josh McKenzie for CASSANDRA-17239
2022-01-06 14:30:22 -07: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
Benedict Elliott Smith e4d96721bf Merge branch 'cassandra-2.2' into cassandra-3.0 2021-11-10 11:10:04 +00:00
Benedict Elliott Smith 4884e9b58f Upgrade tests fail with InvocationTargetException
patch by Benedict; reviewed by Mick Semb Wever for CASSANDRA-17050
2021-11-10 10:48:23 +00:00
Sumanth Pasupuleti 11af037fd9 Add blocking pendingranges calculation when keyspace is added
Patch by Sumanth Pasupuleti, reviewed by Alex Petrov for CASSANDRA-15433
2021-10-15 11:05:26 +02:00
Alex Petrov 13632e9a99 Avoid re-prepare storm on qualified statements after `use`
Patch by Alex Petrov; reviewed by Marcus Eriksson for CASSANDRA-15252
2021-10-01 18:02:18 +02:00
Andrés de la Peña 4f8afe85bf Immediately apply stream throughput, considering negative values as unthrottled
patch by Andrés de la Peña; reviewed by Aleksei Zotov, Brandon Williams and Berenguer Blasi for CASSANDRA-16959

Co-authored-by: Niteshwar Kumar <niteshwar_kumar@persistent.com>
Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
2021-10-01 11:27:28 +01:00
Aleksandr Sorokoumov 3e6faca572 Do not release new SSTables in offline transactions
patch by Aleksandr Sorokoumov; reviewed by Andrés de la Peña and Branimir Lambov for CASSANDRA-16975
2021-09-30 13:01:02 +01:00
Aleksei Zotov 660dace43c Add tests for Resource fromName/getName
patch by Aleksei Zotov; reviewed by Berenguer Blasi, Sam Tunnicliffe for CASSANDRA-16995
2021-09-29 13:06:58 +04:00
Stefan Miklosovic 6b16b67cd4 update jBCrypt dependency to version 0.4
patch by Stefan Miklosovic; reviewed by Dinesh Joshi for CASSANDRA-9384
2021-09-29 07:39:29 +02:00
Benjamin Lerer 9f492844d5 Avoid useless SSTable reads during single partition queries
patch by Benjamin Lerer; reviewed by Caleb Rackliffe for CASSANDRA-16944
2021-09-28 15:16:24 +02:00
Ekaterina Dimitrova bd406c7ca9 Ignore LongSharedExecutorPoolTest until SEPThreadpool is re-evaluated
patch by Ekaterina Dimitrova; reviewed by Ekaterina Dimitrova, Brandon Williams for CASSANDRA-16973
2021-09-24 12:09:17 -04:00
Andrés de la Peña af85e7ad49 Fix flaky ViewTest#testTruncateWhileBuilding
patch by Andrés de la Peña; reviewed by Berenguer Blasi for CASSANDRA-16972
2021-09-24 11:42:07 +01:00
Ekaterina Dimitrova 57f53f53ae Avoid removing batch when it's not created during view replication
patch by Zhao Yang, Ekaterina Dimitrova; reviewed by Zhao Yang, Ekaterina Dimitrova, Brandon Williams for CASSANDRA-16175

Co-authored-by: Zhao Yang <zhao.yang@datastax.com>
Co-authored-by: Ekaterina Dimitrova <ekaterina.dimitrova@datastax.com>
2021-09-07 10:36:41 -04:00
Stefan Miklosovic 267d3ce04e make the addition of regular column to COMPACT tables throw an InvalidRequestException
patch by Stefan Miklosovic; reviewed by Benjamin Lerer for CASSANDRA-14564
2021-09-06 10:18:37 +02:00
Ekaterina Dimitrova 67eb22ec9d Fix materialized view schema backup as table
patch by Zhao Yang, Ekaterina Dimitrova; reviewed by Benjamin Lerer, Ekaterina Dimitrova for CASSANDRA-12734

Co-authored-by: Zhao Yang <zhao.yang@datastax.com>
Co-authored-by: Ekaterina Dimitrova <ekaterina.dimitrova@datastax.com>
2021-09-03 10:23:43 -04:00
Caleb Rackliffe f9d41ff836 Avoid signaling DigestResolver until the minimum number of responses are guaranteed to be visible
patch by Caleb Rackliffe; reviewed by Jon Meredith for CASSANDRA-16883
2021-08-31 16:22:25 -05:00