Skip to content

segments with mostly DEL are "compacted" again and again #6289

@ThomasWaldmann

Description

@ThomasWaldmann

Noticed while doing #5679:

Your borg version (borg -V).

1.2.0rc1 (likely same in 1.1.x)

Full borg commandline that lead to the problem (leave away excludes and passwords)

borg compact REPO

Describe the problem you're observing.

If one heavily deleted archives, there are likely some segments mostly consisting of DEL tags.
In hints -> compact data structure, a DEL is accounted as a freeable object of 41 bytes (9 header + 32 chunk id).
Thus, such a segment is about 100% freeable and a candidate for compaction.

Not nice: if the DELs are still needed because the segments with the respective PUTs were not covered by the compaction run (e.g. because they are below compaction threshold of 10%), it will just shuffle all these DELs to a new segment, without freeing anything.

And as that new segment again is 100% freeable, this will repeat in future compaction runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions