Skip to content

Conversation

@djatnieks
Copy link

@djatnieks djatnieks commented Nov 14, 2025

What is the issue

Fixes https://github.com/riptano/cndb/issues/15995

What does this PR fix and why was it fixed

Adds a new StorageCompatiilityMode.CC4 to enable CC 4.0 backward compatibility mode for schema CQL output, allowing CC 5.0 to generate schemas that CC 4.0 can parse without errors.

The StorageCompatiilityMode.CC4 value is similar to the existing CASSANDRA_4 value except that CC4 permits the use of BTI/TrieIndex format.

CNDB tests like CDCMigrationTest involve mixed version writers and CC 5.0 schemas contain options that are unknown to CC 4.0 based writers.

WIth these changes, CNDB 5.0 can set storage_compatibility_mode to CC4 make CC 5.0 filter out 5.0-only table options, allowing a shared schema that CNDB 4.0 nodes are able to process.

@github-actions
Copy link

Checklist before you submit for review

  • This PR adheres to the Definition of Done
  • Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits
  • All new files should contain the DataStax copyright header instead of the Apache License one

@djatnieks
Copy link
Author

The corresponding CNDB changes are in https://github.com/riptano/cndb/pull/16035

@driftx
Copy link

driftx commented Nov 17, 2025

The StorageCompatibilityModeTest failure looks legit, but otherwise good:

junit.framework.AssertionFailedError: Undefined behaviour for mode CC_4 at org.apache.cassandra.utils.StorageCompatibilityModeTest.testBtiFormatAndStorageCompatibilityMode(StorageCompatibilityModeTest.java:53)

@djatnieks
Copy link
Author

The StorageCompatibilityModeTest failure looks legit

Missed that one, thanks. I pushed a commit to fix it.

@djatnieks
Copy link
Author

There is another related test failure in CreateTest - I am investigating that too.

@djatnieks
Copy link
Author

@driftx The test failures related to this PR should be fixed now - the remaining problems reported by butler are those we've been seeing on main-5.0, including testMultiVersionCompatibilityWithClusteringKeyFiltering which is relatively new so not in the comparison with main-5.0-nightly build results yet.

@djatnieks
Copy link
Author

Rebased and resolved conflicts with lastest main-5.0

@djatnieks djatnieks merged commit 8246cb4 into main-5.0 Nov 19, 2025
75 of 515 checks passed
@djatnieks djatnieks deleted the CNDB-15995 branch November 19, 2025 01:33
@sonarqubecloud
Copy link

@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-2126 rejected by Butler


2 regressions found
See build details here


Found 2 new test failures

Test Explanation Runs Upstream
o.a.c.cql3.validation.operations.AggregationQueriesTest.testAggregationQueryShouldNotTimeoutWhenItExceedesReadTimeout (compression) REGRESSION 🔴🔴 2 / 17
o.a.c.index.sai.cql.datamodels.QueryWriteLifecycleWithCompositePartitionKeyTest.testWriteLifecycle[aa] () NEW 🔴 0 / 17

Found 4 known test failures

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.

5 participants