CASSANDRA-21617: STCS min_sstable_size should accept data storage units - #5070
Open
aviau wants to merge 1 commit into
Open
CASSANDRA-21617: STCS min_sstable_size should accept data storage units#5070aviau wants to merge 1 commit into
aviau wants to merge 1 commit into
Conversation
aviau
force-pushed
the
aviau/stcs-min-size
branch
3 times, most recently
from
August 27, 2026 02:43
fd50d5b to
481792e
Compare
Contributor
|
what if I have a cluster with mixed versions and I create a table with this parameter to be "50MiB", then it comes to a node which will not know how to parse it however, it is not a good idea to change schema in a mixed-versions scenario, just thinking about the consequences of doing so |
Contributor
|
what I think should happen is that we need to be sure that what we serialize is raw number instead of "50MiB" string. Accepting such a value and serializing it are two different things. |
aviau
force-pushed
the
aviau/stcs-min-size
branch
from
August 27, 2026 21:03
481792e to
9f02bd4
Compare
Contributor
Author
|
Hey @smiklosovic,
Duh. That's a fair point. Or even rollbacks could be bad I guess. New contributor here so thanks for taking the time -- I'll think about mixed versions next time. I updated the MR, do you want to take another look? |
aviau
force-pushed
the
aviau/stcs-min-size
branch
3 times, most recently
from
August 27, 2026 21:15
0a3f001 to
6a31cec
Compare
The documentation for STCS says `min_sstable_size` defaults to `50MB`. I think this is wrong in two ways: - `50MB` is not an accepted value, it only accepts numbers without units. - The real default is actually equivalent to `50MiB`. This commit changes it to be more consistent with UCS and accept storage units. LCS and TWCS also read `min_sstable_size` through SizeTieredCompactionStrategyOptions, so they accept units too. Values are normalized to a plain byte count before the schema is stored, so what we serialize and propagate stays parsable by nodes that predate unit support. UCS is deliberately left alone, since its size options require the unit suffix and would reject a bare byte count. Assisted-by: Claude Code:claude-opus-5 Patch by Alexandre Viau; reviewed by TODO for CASSANDRA-21617
aviau
force-pushed
the
aviau/stcs-min-size
branch
from
August 27, 2026 21:59
6a31cec to
208d12e
Compare
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.
The documentation for STCS says
min_sstable_sizedefaults to50MB.I think this is wrong in two ways:
50MBis not an accepted value, it only accepts numbers without units.50MiB.This commit changes it to be more consistent with UCS and accept storage units.
Assisted-by: Claude Code:claude-opus-5
Patch by Alexandre Viau; reviewed by TODO for CASSANDRA-21617