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
Restore deleteCDCRawFiles logic which is present in 6.0 and trunk but probably lost in 5.0 due to merges
Files may be concurrently removed by the CDC management thread, so we tolerate a file that has already been deleted rather than failing the test.
Fix IndexOutOfBoundsException at commitlog.AbstractCommitLogSegmentManager.forceRecycleAll - it is already fixed in 6.0/trunk.
Cleanup test data after run to reduce disk usage.
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20091
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-21160
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
Adds missing @Test annotations to testPasswordUpdateRateLimiting and testPasswordUpdateRateLimitingDisabled.
Also fixes minor typos in comments and assertion strings.
Fix flaky CassandraRoleManagerTest by grouping per-role rate limit checks consecutively.
patch by Arvind Kandpal; reviewed by Stefan Miklosovic, Michael Semb Wever for CASSANDRA-21262
add SAN to certificates used by tests
add TLS_ECDHE_* to ciphers list in SSTableLoaderEncryptionOptionsTest
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-21441
When BTreeRow.merge reconciles an update into a row whose existing deletion
shadows the update's cells, it filtered the update (incoming) side of the merge
with Reconciler.retain, which records the removal via
PostReconciliationFunction.delete. On the memtable write path that subtracts the
shadowed cells' on-heap size from the allocator's ownership even though that
incoming data was never allocated to the memtable. Under overwrite/delete churn
that re-applies cells already covered by a newer row/partition deletion (e.g.
repair re-streaming), the allocator's "owns" counter drifts negative and the next
flush trips "AssertionError: Negative released" in MemtablePool$SubPool.released
via MemtableAllocator$SubAllocator.releaseAll during discard.
Filter the update (incoming) side with a non-recording variant,
Reconciler.removeShadowed, and keep retain() for the existing side,
whose data the memtable already owns. The filtered result is identical; only the
erroneous accounting notification is dropped. This mirrors the already-correct
complex-column path in ColumnData.merge.
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-21469
Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit fixes several issues found using the Cassandra
edge case explorer skill for the BTI feature.
patch by Francisco Guerrero; reviewed by Aleksey Yeschenko for CASSANDRA-21353
CASSANDRA-21342: Long-tail xref follow-up (cassandra-5.0)
Forward-merge of the trunk long-tail xref fix (commit cc97ee5332) to
cassandra-5.0. Twenty-six files updated; mechanical xref retargets and
three added [[anchor]] targets following the existing convention.
One conflict resolved: architecture/index.adoc - kept 5.0's no-Accord
state with the snitch xref qualified to cassandra:managing/operating/.
patch by Patrick McFadin; reviewed by Mick Semb Wever for CASSANDRA-21342
CASSANDRA-21342: Long-tail xref follow-up (cassandra-4.1 subset)
Forward-merge of the cassandra-4.0 long-tail subset onto cassandra-4.1.
Same three files, same six edits as the 4.0 commit.
patch by Patrick McFadin; reviewed by Mick Semb Wever for CASSANDRA-21342
Subset of the trunk long-tail xref follow-up (commit cc97ee5332)
applicable to cassandra-4.0. Three files have broken patterns that
still apply on this branch after PR #4807's forward-merge: the
architecture index, finding_nodes, and use_tools self-page xrefs.
Six edits total. Mechanical retargets only; no prose was rewritten.
Edits omitted (trunk-only):
* Twenty files introduced in 5.0 or later (developing/cql/, reference/
cql-commands/, managing/operating/, etc).
* use_tools.adoc edits 4 and 5 (different line state on 4.x;
packet-capture anchor section structure differs).
patch by Patrick McFadin; reviewed by Mick Semb Wever for CASSANDRA-21342
The build+test cells run in `ws("workspace/${JOB_NAME}/${BUILD_NUMBER}/${cell.step}/${cell.arch}/jdk-${cell.jdk}/python-${cell.python}")`, so every build writes a new per-build directory.
The `cleanWs()` only cleans the current cell's leaf, and it sat as the last statement in the `ws` block — so any cell hitting error() (failed/timed-out/aborted) exits before reaching it and leaves the full cell's workspace build behind.
patch by Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-20436
Additional fixes
- upgrade ubuntu-test.docker to ubuntu 22.04 (and some small fixes brought forward from CASSANDRA-20997)
- (.jenkins/k8s) changes gke's small node pool from n2-highcpu-8 to e2-highcpu-8 (gke's own pod resources reqs increased)
- (.jenkins/k8s) limit one agent pod per node (when jenkins is deployed in k8s using our helm)
- (.jenkins/k8s) add the cassandra-6.0 job
- pass maven.repo.local sys prop, if set, into accord's gradle build
- check and fail on maven dependencies checksums when downloading
- when on-the-fly building docker images add `--load` (podman compatbility)
- newer python versions can use venv instead of virtualenv
- rename ubuntu2004_test.docker to ubuntu-test.docker (in 5.0)
- (Jenkinsfile) fix retries (which was no longer working when agents/nodes died, since CASSANDRA-20833)
- (Jenkinsfile) @NonCPS where (now) needed
- (Jenkinsfile) fix default value for the branch parameter (after a new helm deploy)
- (.build/run-ci) fix missing parameters on jobs also at helm deploy time
- (.build/run-ci) .git suffixes on repo urls are optional
patch by Mick Semb Wever; reviewed by Dmitry Konstantinov, Stefan Miklosovic for CASSANDRA-21403