Skip to content

Conversation

@blambov
Copy link

@blambov blambov commented Feb 10, 2025

What is the issue

CNDB-12899 CompactionRealm.estimatedPartitionCount() is very expensive

What does this PR fix and why was it fixed

Adds a cached version of the metric and removes the memtable partitions from the calculation to make it more precise for the compaction use case.

Also makes sure that the estimatedPartitionCount metric is not recalculated if the table's data view (i.e. sstable and memtable set) has not changed.

Copy link

@szymon-miezal szymon-miezal left a comment

Choose a reason for hiding this comment

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

I have left a few questions.

blambov and others added 2 commits February 11, 2025 11:48
@sonarqubecloud
Copy link

@blambov blambov merged commit c93158a into datastax:main Feb 11, 2025
403 of 447 checks passed
@cassci-bot
Copy link

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


Approved by Butler
See build details here

szymon-miezal added a commit that referenced this pull request Feb 12, 2025
#1559)

### What is the issue
[CNDB-12899](riptano/cndb#12899)
`CompactionRealm.estimatedPartitionCount()` is very expensive

### What does this PR fix and why was it fixed
Adds a cached version of the metric and removes the memtable partitions
from the calculation to make it more precise for the compaction use
case.

Also makes sure that the `estimatedPartitionCount` metric is not
recalculated if the table's data view (i.e. sstable and memtable set)
has not changed.

---------

Co-authored-by: Szymon Miężał <[email protected]>
djatnieks pushed a commit that referenced this pull request Mar 11, 2025
#1559)

[CNDB-12899](riptano/cndb#12899)
`CompactionRealm.estimatedPartitionCount()` is very expensive

Adds a cached version of the metric and removes the memtable partitions
from the calculation to make it more precise for the compaction use
case.

Also makes sure that the `estimatedPartitionCount` metric is not
recalculated if the table's data view (i.e. sstable and memtable set)
has not changed.

---------

Co-authored-by: Szymon Miężał <[email protected]>
djatnieks pushed a commit that referenced this pull request May 18, 2025
#1559)

[CNDB-12899](riptano/cndb#12899)
`CompactionRealm.estimatedPartitionCount()` is very expensive

Adds a cached version of the metric and removes the memtable partitions
from the calculation to make it more precise for the compaction use
case.

Also makes sure that the `estimatedPartitionCount` metric is not
recalculated if the table's data view (i.e. sstable and memtable set)
has not changed.

---------

Co-authored-by: Szymon Miężał <[email protected]>
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