mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-24 15:12:00 +00:00
update shadow index when doing a double-put, fixes #5661
this fixes the test added in previous commit (avoids that the PUT reappears after index rebuild).
This commit is contained in:
parent
3b1c0df7c8
commit
6d9513f507
1 changed files with 1 additions and 4 deletions
|
@ -1300,10 +1300,7 @@ def put(self, id, data, wait=True):
|
|||
pass
|
||||
else:
|
||||
# note: doing a delete first will do some bookkeeping.
|
||||
# we do not want to update the shadow_index here, because
|
||||
# we know already that we will PUT to this id, so it will
|
||||
# be in the repo index (and we won't need it in the shadow_index).
|
||||
self._delete(id, in_index.segment, in_index.offset, in_index.size, update_shadow_index=False)
|
||||
self._delete(id, in_index.segment, in_index.offset, in_index.size, update_shadow_index=True)
|
||||
segment, offset = self.io.write_put(id, data)
|
||||
self.storage_quota_use += header_size(TAG_PUT2) + len(data)
|
||||
self.segments.setdefault(segment, 0)
|
||||
|
|
Loading…
Reference in a new issue