mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 02:08:54 +00:00
AdHocCache: explicate chunk_incref assertion
This commit is contained in:
parent
5eeca3493b
commit
2cbff48fd3
1 changed files with 3 additions and 0 deletions
|
@ -1001,6 +1001,9 @@ def chunk_incref(self, id, stats, size_=None):
|
|||
self._begin_txn()
|
||||
count, size, csize = self.chunks.incref(id)
|
||||
stats.update(size or size_, csize, False)
|
||||
# When size is 0 and size_ is not given, then this chunk has not been locally visited yet (seen_chunk with
|
||||
# size or add_chunk); we can't add references to those (size=0 is invalid) and generally don't try to.
|
||||
assert size or size_
|
||||
return ChunkListEntry(id, size or size_, csize)
|
||||
|
||||
def chunk_decref(self, id, stats, wait=True):
|
||||
|
|
Loading…
Reference in a new issue