Add Cassandra 5.0 storage backend support and integration tests#4897
Open
Ranexia04 wants to merge 1 commit into
Open
Add Cassandra 5.0 storage backend support and integration tests#4897Ranexia04 wants to merge 1 commit into
Ranexia04 wants to merge 1 commit into
Conversation
|
|
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>
ab084e0 to
2148d36
Compare
Ranexia04
commented
Jun 8, 2026
| final int cassandraMajorVersion) { | ||
| if (!configuration.get(CF_COMPRESSION)) { | ||
| // No compression | ||
| // Cassandra 5+ rejects {'sstable_compression': ''} — use {'enabled': false} instead. |
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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),CQLKeyColumnValueStoreused the driver'swithNoCompression(), which emits the legacycompression = {'sstable_compression': ''}form. Cassandra 5.0 rejects this withInvalidConfigurationInQueryException: 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-authMaven profiles (mirroring thecassandra4-*ones), pinned to5.0.8.cassandra5-*.yamltest 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 resolvescassandra5for 5.x.ci-backend-cql.yml(diskstorage / graphdb / core / hadoop / ssl / client-auth, Java 11 test client).Verification
All
cassandra5-*CQL jobs pass on CI. The compression fix was also reproduced and confirmed against a livecassandra:5.0container: the legacy form reproduces the exact error, while{'enabled': false}succeeds and reads back as{'enabled': 'false'}(whichtestDisableCFCompressoraccepts).For all changes:
master)?For code changes:
For documentation related changes: