mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-13 07:33:47 +00:00
compact: not "freeable", but "maybe freeable"
e.g. if there is a ton of DELs in a segment, they all are maybe freeable, but only if we also got rid of the respective PUTs (see also #6289).
This commit is contained in:
parent
e80b5c2272
commit
17e8aef394
1 changed files with 2 additions and 2 deletions
|
@ -774,12 +774,12 @@ class Repository:
|
|||
# we want to compact if:
|
||||
# - we can free a considerable relative amount of space (freeable_ratio over some threshold)
|
||||
if not (freeable_ratio > threshold):
|
||||
logger.debug('not compacting segment %d (freeable: %2.2f%% [%d bytes])',
|
||||
logger.debug('not compacting segment %d (maybe freeable: %2.2f%% [%d bytes])',
|
||||
segment, freeable_ratio * 100.0, freeable_space)
|
||||
pi.show()
|
||||
continue
|
||||
segments.setdefault(segment, 0)
|
||||
logger.debug('compacting segment %d with usage count %d (freeable: %2.2f%% [%d bytes])',
|
||||
logger.debug('compacting segment %d with usage count %d (maybe freeable: %2.2f%% [%d bytes])',
|
||||
segment, segments[segment], freeable_ratio * 100.0, freeable_space)
|
||||
for tag, key, offset, data in self.io.iter_objects(segment, include_data=True):
|
||||
if tag == TAG_COMMIT:
|
||||
|
|
Loading…
Add table
Reference in a new issue