-
Notifications
You must be signed in to change notification settings - Fork 3.8k
CASSANDRA-20820 Include Level information for UnifiedCompactionStrategy in nodetool tablestats output #4476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
CASSANDRA-20820 Include Level information for UnifiedCompactionStrategy in nodetool tablestats output #4476
Conversation
jyothsnakonisa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I have a few suggestions to reduce code redundancy.
test/distributed/org/apache/cassandra/distributed/test/ColumnFamilyStoreMBeansTest.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/compaction/CompactionStrategyManager.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.java
Show resolved
Hide resolved
src/java/org/apache/cassandra/tools/nodetool/stats/TableStatsHolder.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/tools/nodetool/stats/TableStatsPrinter.java
Outdated
Show resolved
Hide resolved
test/distributed/org/apache/cassandra/distributed/test/ColumnFamilyStoreMBeansTest.java
Outdated
Show resolved
Hide resolved
test/distributed/org/apache/cassandra/distributed/test/ColumnFamilyStoreMBeansTest.java
Outdated
Show resolved
Hide resolved
| CLUSTER.get(1).runOnInstance(() -> { | ||
| ColumnFamilyStore cfs = Keyspace.open(KEYSPACE).getColumnFamilyStore("cf"); | ||
| Assert.assertTrue(cfs.getPerLevelMaxDensityThreshold().length > 0); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add actual threshold value validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the max density threshold in UCS is calculated dynamically based on some runtime values double maxDensity = controller.getMaxLevelDensity(0, controller.getBaseSstableSize(controller.getFanout(0)) / shardManager.localSpaceCoverage());. I think if I were to calculate and check that the two values correspond I would end up doing something similar to what is done in getPerLevelMaxDensityThreshold.
test/distributed/org/apache/cassandra/distributed/test/ColumnFamilyStoreMBeansTest.java
Show resolved
Hide resolved
jyothsnakonisa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all the feedback, looks good to me
Added additional level information to table stats for UCS.
patch by Alan Wang;
reviewed by for CASSANDRA-20820
Co-authored-by: Name1
Co-authored-by: Name2