Skip to content

Conversation

@djatnieks
Copy link

What is the issue

Another follow up fix for CNDB-15995.

What does this PR fix and why was it fixed

The previous follow up to CNDB-15995

CNDB-15995 Preserve "default" configuration class name when serializing memtable params for CC4 compatibility. (#2138) ef37cba Daniel Jatnieks [email protected] Nov 21, 2025 at 12:32 PM

fixed CNDB tests SchemaJsonSerDeTest and SchemaTrackerTest.smokeTest that failed in the CNDB side PR related to this issue (CNDB-15995). The issue was around round-trip serialization/deserialization of schema's being the same. If the original schema does not include any memtable = option, the default configuration is used, which in CC5 is trie. When CNDB runs with cndb.storage_compatibility_mode = CC_4 then this was serialized back as memtable = {'class' : 'trie'}, but then it doesn't match the original schema. Commit ef37cba4b8 addressed by recognizing that trie is the default configuration and instead serializing as memtable = {'class' : 'default'} which the CC5 memtable processing of CC4 style map options is able to process, and fixed that as far as that goes.

However, this created a new problem because when CNDB migration tests, such as CDCMigrationTest#testMixedVersionWritersWithCurrentVersionServices execute, they will send the CC4 version schema to an actual CC4 C* instance. The problem is that CC4 does not recognize memtable = {'class' : 'default'} and throws an exception.

This new change changes the serialization of CC_4 compatibility mode to still recognize that a trie configuration is the default, but now serializes back as memtable = {}. The intent is to preserve the default meaning. e.g. trie, or some other config, is being used because it was the "default". Serialization should reflect that the memtable configuration is the "default" too and whichever C* version consumes that schema can interpret what default means.

…hould be an empty map, not a map containing "class : default" because CC4 does not understand that.
@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 djatnieks changed the title CNDB-15995 The default memtable configuration for CC4 compatibility should be an empty map, not a map containing "class : default" because CC4 does not understand that. CNDB-15995 The default memtable configuration for CC4 compatibility should be an empty map, not a map containing "class : default" Nov 24, 2025
@sonarqubecloud
Copy link

@cassci-bot
Copy link

✔️ Build ds-cassandra-pr-gate/PR-2139 approved by Butler


Approved by Butler
See build details here

@djatnieks djatnieks requested a review from driftx November 24, 2025 17:48
@djatnieks djatnieks merged commit c64ed28 into main-5.0 Nov 24, 2025
571 of 593 checks passed
@djatnieks djatnieks deleted the CNDB-15995-follow-up-2 branch November 24, 2025 19:06
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.

4 participants