Skip to content

Conversation

@alanwang67
Copy link
Contributor

Added additional level information to table stats for UCS.

  • perLevelAvgTokenSpace
  • perLevelMaxDensityThreshold
  • perLevelAvgSize
  • perLevelAvgDensity
  • perLevelAvgDensityMaxDensityThresholdRatio
  • perLevelMaxDensityMaxDensityThresholdRatio

patch by Alan Wang;

reviewed by for CASSANDRA-20820

Co-authored-by: Name1
Co-authored-by: Name2

Copy link
Contributor

@jyothsnakonisa jyothsnakonisa left a 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.

CLUSTER.get(1).runOnInstance(() -> {
ColumnFamilyStore cfs = Keyspace.open(KEYSPACE).getColumnFamilyStore("cf");
Assert.assertTrue(cfs.getPerLevelMaxDensityThreshold().length > 0);
});
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@jyothsnakonisa jyothsnakonisa left a 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

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.

3 participants