summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarian Beermann <public@enkore.de>2016-08-27 14:31:57 +0200
committerMarian Beermann <public@enkore.de>2016-08-27 14:31:57 +0200
commite4e678790610a67ef866d569143157d80c7f6c26 (patch)
tree65db270eaf91ee539c8b0afd968669735d332bde /src
parente60ed80433149f453faed8f866c1068c2ed3b194 (diff)
recreate: fix crash if recompress and deduplication beyond autocommit_threshold
ie. it means that if all the recompressed chunks were already in the repo no data would be written, so there would be no active txn, so failure ensues.
Diffstat (limited to 'src')
-rw-r--r--src/borg/archive.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/borg/archive.py b/src/borg/archive.py
index 209effc4e..9546cb0af 100644
--- a/src/borg/archive.py
+++ b/src/borg/archive.py
@@ -1450,7 +1450,7 @@ class ArchiveRecreater:
chunk_id, size, csize = self.cache.add_chunk(chunk_id, chunk, target.stats, overwrite=overwrite)
new_chunks.append((chunk_id, size, csize))
self.seen_chunks.add(chunk_id)
- if self.recompress:
+ if self.recompress and self.cache.seen_chunk(chunk_id) == 1:
# This tracks how many bytes are uncommitted but compactable, since we are recompressing
# existing chunks.
target.recreate_uncomitted_bytes += csize