Cassandra resolves pluggable extensions by class name from configuration, schema, and tooling
inputs. These names were loaded with an initializing Class.forName(name) and type-checked only
afterward, so the named class ran its static initializer before its type was confirmed. After this
change such classes will be loaded without initialization, verified against the expected interface or
base class, and initialized only through normal use after validation.
A shared FBUtilities.classForNameWithoutInitialization helper and typed
instanceOrConstruct/construct overloads apply this to the configurable extension points loaded by
class name: the authentication, authorization, role-management, network and
internode-authenticator backends, the partitioner, audit logger, configuration loader, seed provider,
snitch, abstract types, secondary and custom indexes, compaction strategy, compressor, replication
strategy, SASI analyzers, key and cache providers, query handler, storage and stream hooks, tracing,
the JMX authorization proxy, MBeans, the monotonic clock, nodetool Sjk, triggers, the
sstableloader and stress class options, and diagnostic event classes (loaded without initialization
and checked against DiagnosticEvent, preserving the InvalidClassException contract and the existing
package restriction).
Regression tests confirm that an invalid-type load is rejected without initializing the target
class, and that valid implementations still resolve.
Hadoop client integration and hard-coded JDK and internal class probes are left unchanged.
patch by Jeremiah Jordan; reviewed by Stefan Miklosovic for CASSANDRA-21525
If fullquerylog is enabled and a prepared query executed with null value
binded, then fqltool dump is running into NPE. Checking value for null before
wrapping it.
patch by N V Harikrishna; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18113
CASSANDRA-16384 test case AuditLoggerTest fail on aarch64 platform
CASSANDRA-16392 Unable to load the library netty_tcnative_linux_aarch_64
patch by Zhao Renhai (赵 仁海); reviewed by Mick Semb Wever for CASSANDRA-16384,CASSANDRA-16392
Provides the tools/bin/generate-tokens script that can be used to pregenerate allocation strategy tokens.
Refactors TokenAllocation for extensibility (and better re-use between strategies), and adds OfflineTokenAllocator.
TokenMetadata now has a configurable snitch (instead of hardcoded to DatabaseDescriptor.getEndpointSnitch()) for testability.
Adds logging of growth and stddev changes to allocate_tokens_for_local_replication_factor usages.
patch by Mick Semb Wever; reviewed by Paul Motta, Ekaterina Dimitrova for CASSANDRA-16205
This reverts the changes made to the native protocol V5 wire format in
CASSANDRA-13304 and subsequent follow up JIRAs (CASSANDRA-15556 &
CASSANDRA-14716). The framing format has been re-implemented based on the
internode messaging format developed in CASSANDRA-15066.
OPTIONS and STARTUP messages are unframed (i.e. identical to the V4 format).
After sending its response to a STARTUP message, the server modifies the
pipeline and all further messages are sent (and should be expected by the
client to be received) in the format determined by the protocol version of
the STARTUP message.
Patch by Sam Tunnicliffe; reviewed by Alex Petrov and Caleb Rackliffe
for CASSANDRA-15299
This fixes backwards compatibility with the 3.11 server_encryption_options
while exposing the correct defaults after the 4.0 Netty refactor.
Patch by Joseph Lynch; Reviewed by Ekaterina Dimitrova for CASSANDRA-15262
patch by Zephyr Guo, Dinesh Joshi; reviewed by Jordan West and Dinesh Joshi for CASSANDRA-15295
Co-Authored-By: Zephyr Guo <gzh1992n@gmail.com>
Co-Authored-By: Dinesh Joshi <dinesh.joshi@apple.com>
patch by Aleksey Yeschenko and Benedict Elliott Smith; reviewed by Alex
Petrov, Aleksey Yeschenko, and Benedict Elliott Smith for CASSANDRA-15066
Co-authored-by: Aleksey Yeschenko <aleksey@apache.org>
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>