Skip to content

Add Cassandra 5.0 storage backend support and integration tests#4897

Open
Ranexia04 wants to merge 1 commit into
JanusGraph:masterfrom
Ranexia04:add-cassandra5-integration-tests
Open

Add Cassandra 5.0 storage backend support and integration tests#4897
Ranexia04 wants to merge 1 commit into
JanusGraph:masterfrom
Ranexia04:add-cassandra5-integration-tests

Conversation

@Ranexia04

Copy link
Copy Markdown

Addresses #4842.

Summary

Adds Cassandra 5.0 support to the CQL backend: a real bug fix surfaced by running the existing test suite against Cassandra 5.0, plus integration-test coverage so 5.0 is exercised the same way 3.11 / 4.0 are.

Bug fix

When compression is disabled (storage.cql.compression = false), CQLKeyColumnValueStore used the driver's withNoCompression(), which emits the legacy compression = {'sstable_compression': ''} form. Cassandra 5.0 rejects this with InvalidConfigurationInQueryException: Missing sub-option 'class' for the 'compression' option. On Cassandra 5+ we now disable compression via {'enabled': false}, which is accepted by all supported Cassandra versions (3.x/4.x behavior is unchanged). This mirrors the existing version-aware handling already present for the enabled-compression options.

Test coverage

  • cassandra5-byteordered, cassandra5-murmur, cassandra5-murmur-ssl, cassandra5-murmur-client-auth Maven profiles (mirroring the cassandra4-* ones), pinned to 5.0.8.
  • cassandra5-*.yaml test configs written in the modern Cassandra 5.0 parameter format (unit-suffixed names, e.g. read_request_timeout: 5000ms) so the server boots with no deprecation warnings.
  • JanusGraphCassandraContainer.getConfigPrefix() now resolves cassandra5 for 5.x.
  • CI matrix entries in ci-backend-cql.yml (diskstorage / graphdb / core / hadoop / ssl / client-auth, Java 11 test client).
  • Docs note that 3.11 / 4.0 / 5.0 are integration-tested.

Verification

All cassandra5-* CQL jobs pass on CI. The compression fix was also reproduced and confirmed against a live cassandra:5.0 container: the legacy form reproduces the exact error, while {'enabled': false} succeeds and reads back as {'enabled': 'false'} (which testDisableCFCompressor accepts).

Note on CI cost: this adds ~10 jobs to the always-on tests matrix. Happy to narrow the matrix (e.g. drop the byteordered or ssl/client-auth variants for 5.0) if that's preferred.


For all changes:

For code changes:

  • Have you written and/or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0? (no new dependencies)
  • If applicable, have you updated the LICENSE.txt file? (not applicable)
  • If applicable, have you updated the NOTICE.txt file? (not applicable)

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 8, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Ranexia04 / name: Henrique Lourenço (ab084e0)

Addresses JanusGraph#4842.

Fix the disable-compression code path in CQLKeyColumnValueStore, which
emitted the legacy {'sstable_compression': ''} option that Cassandra 5.0
rejects ("Missing sub-option 'class'"); disable via {'enabled': false}
on Cassandra 5+ instead.

Add Cassandra 5.0 integration-test coverage: cassandra5-* Maven profiles,
modern-format cassandra5 test YAML configs, JanusGraphCassandraContainer
5.x config-prefix support, CI matrix entries, and docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Henrique Lourenço <henrique@mapped.com>
@Ranexia04 Ranexia04 force-pushed the add-cassandra5-integration-tests branch from ab084e0 to 2148d36 Compare June 8, 2026 09:55
final int cassandraMajorVersion) {
if (!configuration.get(CF_COMPRESSION)) {
// No compression
// Cassandra 5+ rejects {'sstable_compression': ''} — use {'enabled': false} instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CassandraContainer.withNoCompression() generates compression = {'sstable_compression': ''}, which Cassandra 5.0 rejects with "Missing sub-option 'class' for the 'compression' option". The {'enabled': false} form is accepted by Cassandra 3.x, 4.x, and 5.x, so this branch is only needed for the sstable_compression → enabled rename rather than an incompatibility in the disable-compression semantics themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant