cockroachdb / pebble

RocksDB/LevelDB inspired key-value database in Go
BSD 3-Clause "New" or "Revised" License
4.94k stars 458 forks source link

db: expose aggregate RangeDeletionBytesEstimate metric #1455

Open jbowens opened 2 years ago

jbowens commented 2 years ago

Root cause is still indeterminate, but at the moment it looks like cockroachdb/cockroach#68303 is caused by disk space unreclaimed because of open snapshots.

We don't have great visibility here. Pebble calculates a RangeDeletionBytesEstimate table statistic for every sstable containing range deletion tombstone(s). It also calculates a less-reliable PointDeletionsBytesEstimate estimate for tables that contain many point deletions.

We could write a manifest.Annotator that sums RangeDeletionBytesEstimate across all the files of a level and expose a Pebble metric that sums the annotation across all levels. The metric would provide some visibility into the amount of disk space yet to be reclaimed by range deletions in a store.

Jira issue: PEBBLE-109

github-actions[bot] commented 1 year ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to Pebble!