Skip to content

events/pebblepersist before/after (almost) always shows zero change #1404

Description

@uniphil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions