Skip to content

CASSANDRA-21196: Include tools in applyCompatibilityMode check#4662

Open
thisteensy wants to merge 1 commit intoapache:trunkfrom
thisteensy:thisteensy/CASSANDRA-21196/trunk
Open

CASSANDRA-21196: Include tools in applyCompatibilityMode check#4662
thisteensy wants to merge 1 commit intoapache:trunkfrom
thisteensy:thisteensy/CASSANDRA-21196/trunk

Conversation

@thisteensy
Copy link

@thisteensy thisteensy commented Mar 6, 2026

## CASSANDRA-21196: Include tools in applyCompatibilityMode check

### Problem
The `applyCompatibilityMode()` method only checked `isClientInitialized()` 
when setting `StorageCompatibilityMode.NONE`, despite the comment stating 
"tools or clients should not limit the sstable formats they support." 
Tools were inadvertently falling through to the `else if` branch and 
potentially having their sstable format support restricted.

### Solution
Added `isClientorToolInitialized()` to the condition so tools correctly receive 
`StorageCompatibilityMode.NONE`, consistent with the existing behavior 
for clients.

patch by Tina Haiser; reviewed by <Reviewers> for CASSANDRA-21196

The Cassandra Jira

private static void applyCompatibilityMode()
{
if (isClientInitialized())
if (isClientInitialized() || isToolInitialized())
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine but there is a convenience method isClientOrToolInitialized also.

Copy link
Author

Choose a reason for hiding this comment

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

I fixed that. Both 5.1 and 5.0 are updated now.

@thisteensy thisteensy force-pushed the thisteensy/CASSANDRA-21196/trunk branch from dca01cf to aca63d5 Compare March 6, 2026 14:19
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.

2 participants