-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[CASSANDRA-20132][5.0] Add new table metric PurgeableTombstoneScannedHistogram and a tracing event for scanned purgeable tombstones #3730
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
I think the iter.partitionLevelDeletions gc-able is kinda checked with the cell.isLive below, but there may be partition level delete with no actual data behind it in other sstable that wouldn't be counted. Worth a test at least
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.
fails for example when considerZeroes is true
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.
with
above passes
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.
Hm, interesting. Thank you for noticing it. I have created PurgeableTombstonesMetricRecording iterator based on MetricRecording iterator logic. It looks like the existing tombstoneScannedHistogram has the same behaviour. Should I change considerZeroes = true for tombstoneScannedHistogram and add the counter increment on a partition delete to MetricRecording as well?
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.
I think we should update existing one and put a note in NEWS.txt, but might be worth a discuss on dev list. It can be a bit confusing when there is, or isnt data shadowed
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.
I have looked again through the added code and now I am a bit concerned about the iteration over cells to check for cell tombstones - it may create a performance overhead + I am not sure if information about droppable cell tombstones is really valuable: all the times when I saw issues with droppable tombstones - it was about row tombstones. I am thinking now about an option to count only partition level and row level tombstones in this added logic and skip cell tombstones part..
I am going to measure the overhead to see how big the impact can be..
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.
good to measure but the cells are already materialized so the overhead id imagine to be pretty minor, could maybe piggy bank on the withMetricsRecording's iterations (like countTombstone method)
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.
yes, I do not expect a huge impact but I want to check if it is visible. We may read many rows if we select a big enough partition and each row has some number of cells, so MxN cells to iterate and check. As I mentioned, I suppose frequently per-cell stats are not really needed to pay an overhead for it, IMHO.. A configuration option can be a compromise here, like: droppable_tobmstones_metric_granularity: disabled|row|cell
In https://issues.apache.org/jira/browse/CASSANDRA-20165 I have spent some time already to try to reduce the number of such non-optimal places already, so I would not like to introduce one more by myself :-D
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.
I have added results to CASSANDRA-20132