summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2023-10-28 17:17:47 +0200
committerThomas Waldmann <tw@waldmann-edv.de>2023-10-28 17:17:47 +0200
commitb21ed3c6585fe42b0df74e67d8a63d4f89e93572 (patch)
tree37f7f8362241ddad21d41438a38c666913c2c4d0 /src
parent8e6449f28e8edf9d1090bdb1a554d9c7a4ef94f4 (diff)
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).
Diffstat (limited to 'src')
-rw-r--r--src/borg/repository.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/borg/repository.py b/src/borg/repository.py
index 9c0284831..7cf15b1f5 100644
--- a/src/borg/repository.py
+++ b/src/borg/repository.py
@@ -1224,10 +1224,7 @@ class Repository:
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, segment, offset, update_shadow_index=False)
+ self._delete(id, segment, offset, update_shadow_index=True)
segment, offset = self.io.write_put(id, data)
self.storage_quota_use += len(data) + self.io.put_header_fmt.size
self.segments.setdefault(segment, 0)