seems like the intent is to show "how much space did we clear" immediately after the trim, but the DeleteRange call only adds a range-tombstone to the database. space is eventually cleared later, on compaction.
|
err = pp.db.DeleteRange(zeroKey[:], key[:], pebble.Sync) |
|
if err != nil { |
|
return err |
|
} |
|
sizeAfter, _ := pp.db.EstimateDiskUsage(zeroKey[:], ffffKey[:]) |
|
log.Info("pebble gc", "before", sizeBefore, "after", sizeAfter) |
it doesn't seem like this log is needed for consistency with other persistence methods, so it could probably be cleaned up to just ..., "size_estimate", size).
i'm not sure if you can get an estimate for size-cleared by a delete from pebble, except at the coarsest level like (space_used / ttl * trim_interval) or something, which isn't that useful.
seems like the intent is to show "how much space did we clear" immediately after the trim, but the
DeleteRangecall only adds a range-tombstone to the database. space is eventually cleared later, on compaction.indigo/events/pebblepersist/pebblepersist.go
Lines 252 to 257 in af2fec9
it doesn't seem like this log is needed for consistency with other persistence methods, so it could probably be cleaned up to just
..., "size_estimate", size).i'm not sure if you can get an estimate for size-cleared by a delete from pebble, except at the coarsest level like (
space_used / ttl * trim_interval) or something, which isn't that useful.