mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-01 12:09:10 +00:00
repository: add debug logging for issue #6687
This commit is contained in:
parent
9f0050d409
commit
00aca33ba6
1 changed files with 15 additions and 5 deletions
|
@ -859,11 +859,11 @@ def complete_xfer(intermediate=True):
|
||||||
elif tag == TAG_DELETE and not in_index:
|
elif tag == TAG_DELETE and not in_index:
|
||||||
# If the shadow index doesn't contain this key, then we can't say if there's a shadowed older tag,
|
# If the shadow index doesn't contain this key, then we can't say if there's a shadowed older tag,
|
||||||
# therefore we do not drop the delete, but write it to a current segment.
|
# therefore we do not drop the delete, but write it to a current segment.
|
||||||
shadowed_put_exists = key not in self.shadow_index or any(
|
key_not_in_shadow_index = key not in self.shadow_index
|
||||||
# If the key is in the shadow index and there is any segment with an older PUT of this
|
# If the key is in the shadow index and there is any segment with an older PUT of this
|
||||||
# key, we have a shadowed put.
|
# key, we have a shadowed put.
|
||||||
shadowed < segment
|
shadowed_put_exists = key_not_in_shadow_index or any(
|
||||||
for shadowed in self.shadow_index[key]
|
shadowed < segment for shadowed in self.shadow_index[key]
|
||||||
)
|
)
|
||||||
delete_is_not_stable = index_transaction_id is None or segment > index_transaction_id
|
delete_is_not_stable = index_transaction_id is None or segment > index_transaction_id
|
||||||
|
|
||||||
|
@ -909,6 +909,16 @@ def complete_xfer(intermediate=True):
|
||||||
self.compact[new_segment] += size
|
self.compact[new_segment] += size
|
||||||
segments.setdefault(new_segment, 0)
|
segments.setdefault(new_segment, 0)
|
||||||
else:
|
else:
|
||||||
|
logger.debug(
|
||||||
|
"dropping DEL for id %s - seg %d, iti %r, knisi %r, spe %r, dins %r, si %r",
|
||||||
|
bin_to_hex(key),
|
||||||
|
segment,
|
||||||
|
index_transaction_id,
|
||||||
|
key_not_in_shadow_index,
|
||||||
|
shadowed_put_exists,
|
||||||
|
delete_is_not_stable,
|
||||||
|
self.shadow_index.get(key),
|
||||||
|
)
|
||||||
# we did not keep the delete tag for key (see if-branch)
|
# we did not keep the delete tag for key (see if-branch)
|
||||||
if not self.shadow_index[key]:
|
if not self.shadow_index[key]:
|
||||||
# shadowed segments list is empty -> remove it
|
# shadowed segments list is empty -> remove it
|
||||||
|
|
Loading…
Reference in a new issue