Просмотр исходного кода

stats: do not count data volume twice when checkpointing, fixes #3224

(cherry picked from commit 66cd1cd240f078e2d5c9e32656b42dccf2d62935)
Thomas Waldmann 7 лет назад
Родитель
Сommit
49c4cbb93c
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/borg/archive.py

+ 2 - 1
src/borg/archive.py

@@ -942,8 +942,9 @@ Utilization of max. archive size: {csize_max:.0%}
 
 
                 # if we created part files, we have referenced all chunks from the part files,
                 # if we created part files, we have referenced all chunks from the part files,
                 # but we also will reference the same chunks also from the final, complete file:
                 # but we also will reference the same chunks also from the final, complete file:
+                dummy_stats = Statistics()  # do not count this data volume twice
                 for chunk in item.chunks:
                 for chunk in item.chunks:
-                    cache.chunk_incref(chunk.id, stats, size=chunk.size)
+                    cache.chunk_incref(chunk.id, dummy_stats, size=chunk.size)
 
 
     def process_stdin(self, path, cache):
     def process_stdin(self, path, cache):
         uid, gid = 0, 0
         uid, gid = 0, 0