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>
Configured OWASP database to use caching and NVD key. Properties can be
configured in ~/.ant/build.properties and define both the key and
the storage location
Patch by Jacek Lewandowski; reviewed by Maxim Muzafarov, Stefan Miklosovic for CASSANDRA-19146
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
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.
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
The underlying functionality for credentials.sample was firstly introduced in Cassandra 4.1
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18818
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)
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>
patch by Stefan Podkowinski; reviewed by Robert Stupp for CASSANDRA-10508
backported in CASSANDRA-18575 by German Eichberger; reviewed by
brandonwilliams
Allow the user to use a flag to specify a non-default comparison git
branch when detecting changed unit tests to repeat.
Patch by Derek Chen-Becker; reviewed by Andrés de la Peña and Berenguer Blasi for CASSANDRA-17997