give known chunk size to chunk_incref, fixes #2853

chunk_incref was called when dealing with part files without giving the
known chunk size in the size_ parameter.

adjusted LocalCache.chunk_incref to have same signature.
This commit is contained in:
Thomas Waldmann 2017-07-22 20:08:37 +02:00
parent 1d008e87ab
commit 186123cb68
2 changed files with 2 additions and 2 deletions

View file

@ -936,7 +936,7 @@ Utilization of max. archive size: {csize_max:.0%}
# 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:
for chunk in item.chunks:
cache.chunk_incref(chunk.id, stats)
cache.chunk_incref(chunk.id, stats, size_=chunk.size)
def process_stdin(self, path, cache):
uid, gid = 0, 0

View file

@ -877,7 +877,7 @@ class LocalCache(CacheStatsMixin):
id, stored_size, size))
return refcount
def chunk_incref(self, id, stats):
def chunk_incref(self, id, stats, size_=None):
if not self.txn_active:
self.begin_txn()
count, size, csize = self.chunks.incref(id)