Commit Graph

531 Commits

Author SHA1 Message Date
Jeremiah Jordan 26d7b166ba
Verify extension type before initializing reflectively-loaded classes
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
2026-07-20 20:03:45 +02:00
Caleb Rackliffe f375a3914f Support null column value tombstones in FQL batch statements
patch by Caleb Rackliffe; reviewed by Abe Ratnofsky for CASSANDRA-20397
2025-03-06 10:56:49 -06:00
Stefan Miklosovic d6f623b308
Fix preparation of CLASSPATH in tools/bin/cassandra.in.sh for development builds
patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-20257
2025-01-29 16:08:39 +01: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
dmi0 0f2af6ab3f
Fix cassandra-stress in simplenative mode with prepared statements
patch by Dmitry Bychkov; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18744
2023-11-29 17:45:15 +01: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 dc6ad3f6b1
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-05-19 15:11:03 +02:00
Stefan Miklosovic e1e88e5bc4
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-05-19 15:07:59 +02:00
Stefan Miklosovic b828f7ea1b
Pass down all contact points to driver for cassandra-stress
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18025
2023-05-19 15:05:32 +02:00
nvharikrishna b74c86404a
Fix the output of FQL dump tool to properly separate entries
patch by N V Harikrishna; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18215
2023-02-07 14:34:23 +01:00
nvharikrishna ba434b8231
Fix NPE in fqltool dump on null value
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
2023-02-01 14:46:44 +01:00
Brandon Williams 82e0453901 Merge branch 'cassandra-3.11' into cassandra-4.0 2021-07-16 07:58:00 -05:00
Sam Tunnicliffe 9cda055faa Merge branch 'cassandra-3.11' into trunk 2021-04-27 09:31:45 +01:00
Sam Tunnicliffe 87a46c36f0 Merge branch 'cassandra-3.0' into cassandra-3.11 2021-04-27 09:20:25 +01:00
Mick Semb Wever 2ec96ae669
Merge branch 'cassandra-3.0' into cassandra-3.11 2021-04-19 17:34:05 +02:00
Mick Semb Wever 50a97a0d76
Merge branch 'cassandra-2.2' into cassandra-3.0 2021-04-19 17:29:00 +02:00
Mick Semb Wever 53b0661cbb
Fix rat checking for files with missing license headers
patch by Mick Semb Wever; reviewed by Brandon Williams, Ekaterina Dimitrova for CASSANDRA-16558
2021-04-19 17:18:26 +02:00
Mick Semb Wever 1a92e4a649
Merge branch 'cassandra-3.11' into trunk 2021-03-27 00:38:31 +01:00
Mick Semb Wever 9e513390b7
Merge branch 'cassandra-3.0' into cassandra-3.11 2021-03-27 00:36:11 +01:00
Mick Semb Wever 35114d5fcc
Merge branch 'cassandra-2.2' into cassandra-3.0 2021-03-27 00:32:09 +01:00
Mick Semb Wever cd4aa9f77c
ninja-fix missing copyright headers 2021-03-27 00:29:58 +01:00
Adam Holmberg 932b0a483e make cassandra-stress -node work with host:port
Patch by Adam Holmberg; reviewed by brandonwilliams for CASSANDRA-16529
2021-03-19 15:24:56 -05:00
Mick Semb Wever b41873d671
Fix centos packaging for arm64, >=3.0 rpm's now require python3
patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-16477
2021-03-09 22:30:06 +01:00
Bereng 2d9d17894d Fix cassandra-stress JMX connection
Patch by Berenguer Blasi; reviewed by brandonwilliams for CASSANDRA-16473
2021-03-03 09:34:41 -06:00
Sam Tunnicliffe c9d6c725dd Promote protocol v5 from beta
Patch by Sam Tunnicliffe; reviewed by Alex Petrov and Eduard Tudenhoefner
for CASSANDRA-14973
2021-02-23 16:46:39 +00:00
Sam Tunnicliffe 07167c95e3 Ninja: fix fqltool tests (CASSANDRA-16384 follow up) 2021-01-22 11:41:42 +00:00
zhaorenhai 7f1659cd1d
Upgrade netty and chronicle-queue dependencies to get Auditing and native library loading working on arm64 architectures
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
2021-01-22 10:02:20 +01:00
Jon Meredith 7637acc3d7 SSLFactory should initialize SSLContext before setting protocols
patch by Jon Meredith; reviewed by David Capwell, Dinesh Joshi for CASSANDRA-16362
2021-01-07 14:42:10 -08:00
Mick Semb Wever 2346ed8241
Offline token allocation strategy generator tool
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
2020-12-03 19:20:59 +01:00
Jon Meredith 919a8964a8 Bring back the accepted encryption protocols list as configurable option
patch by Jon Meredith; reviewed by Berenguer Blasi, David Capwell, Dinesh Joshi for CASSANDRA-13325
2020-12-02 16:44:54 -08:00
Yuki Morishita d9e2ed00af Remove windows scripts and their references
patch by Yuki Morishita; reviewed by Berenguer Blasi and Andrés de la Peña for CASSANDRA-16171
2020-12-02 16:43:45 +00:00
Sam Tunnicliffe a7c4ba9eee Improve checksumming and compression in protocol V5
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
2020-12-01 18:49:06 +00:00
David Capwell 001767de2d Merge branch 'cassandra-3.11' into trunk 2020-11-05 14:47:17 -08:00
David Capwell 7c407c4380 Merge branch 'cassandra-3.0' into cassandra-3.11 2020-10-19 12:31:15 -07:00
Yifan Cai 83e1e9e451 in-jvm dtest now exposes stdout and stderr for nodetool
patch by Yifan Cai; reviewed by Alex Petrov, David Capwell for CASSANDRA-16057
2020-10-06 13:46:05 -07:00
David Capwell 91bcbb2873 Add a new jmxtool which can dump what JMX objects exist and diff
patch by David Capwell, Stephen Mallette; reviewed by Berenguer Blasi, Jon Meredith for CASSANDRA-16082
2020-09-15 17:01:01 -07:00
Blake Eggleston ccab496d2d Add byte array backed cells
Patch by Blake Eggleston; reviewed by Caleb Rackliffe and Marcus Eriksson for CASSANDRA-15393
2020-09-14 08:32:44 -07:00
Stefan Miklosovic 00c22232d9 FQL replay should have options to ignore DDL statements
Patch by Stefan Miklosovic; reviewed by David Capwell and Marcus Eriksson
for CASSANDRA-16039
2020-08-19 09:40:45 +02:00
Ekaterina Dimitrova cba0c27ce9 Remove COMPACT STORAGE internals
Patch by Ekaterina Dimitrova, reviewed by Sylvain Lebresne for
CASSANDRA-13994
2020-08-17 11:51:23 +02:00
Alex Ott 6d9465a00d Improve cassandra-stress logging when using a profile file that doesn't
exist.

Patch by Alex Ott, reviewed by brandonwilliams for CASSANDRA-14425
2020-08-05 11:52:36 -05:00
Joseph Lynch 674b6cc1a5 Update defaults for server and client TLS settings
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
2020-06-20 18:59:41 -07:00
Robert Stupp ec07cd7e76 Fix tools/bin/fqltool for all shells
patch by Robert Stupp; reviewed by Mick Semb Wever and Eduard Tudenhöfner for CASSANDRA-15820
2020-05-19 16:36:09 +02:00
Marcus Eriksson 5242f7d430 Fix issues in audit / full query log interactions
Patch by marcuse; reviewed by Aleksey Yeschenko and Per Otterström for CASSANDRA-14772
2020-04-16 14:19:54 +02:00
Robert Stupp f14507190b Remove Java Driver dependency for UDFs and UDAs / Limit the dependencies used by UDFs/UDAs
patch by Robert Stupp; reviewed by Jason Brown, Jonathan Ellis, Ryan Svihla for CASSANDRA-14737
2020-02-12 09:58:43 +01:00
yifan-c 1fbd3297a9 Release session from cache when closing QueryReplayer
Patch by Yifan Cai; reviewed by marcuse for CASSANDRA-15514
2020-01-20 15:00:25 +01:00
nvharikrishna e27810efcc [CASSANDRA-12993] Added license text. 2020-01-10 16:05:38 +00:00
Zephyr Guo 3a8300e0b8 Avoid deadlock during CommitLog initialization
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>
2019-12-12 10:13:44 -08:00
Per Otterström d5e5c459f5 Align record header of FQL and audit binary log
Patch by Per Otterström; reviewed by Vinay Chella and marcuse for CASSANDRA-15076
2019-11-28 09:43:07 +01:00
Sumanth Pasupuleti 38b49904dd
Upgrading Guava to 27, and to java-driver 3.6.0 (from 3.4.0-SNAPSHOT), plus refactoring to remove nativePort argument for NativeSSTableLoaderClient constructor
Patch by Sumanth Pasupuleti; reviewed by Michael Semb Wever for CASSANDRA-14655
2019-10-07 21:19:42 +02:00
Benedict Elliott Smith 310a48efcf Rewrite the internode messaging subsystem
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>
2019-06-12 16:26:54 +01:00