mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-28 02:38:43 +00:00
chunk_incref size assertion: fail early
This commit is contained in:
parent
186123cb68
commit
663d3c544a
1 changed files with 1 additions and 1 deletions
|
@ -1002,10 +1002,10 @@ def chunk_incref(self, id, stats, size_=None):
|
||||||
if not self._txn_active:
|
if not self._txn_active:
|
||||||
self._begin_txn()
|
self._begin_txn()
|
||||||
count, size, csize = self.chunks.incref(id)
|
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
|
# 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.
|
# 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_
|
assert size or size_
|
||||||
|
stats.update(size or size_, csize, False)
|
||||||
return ChunkListEntry(id, size or size_, csize)
|
return ChunkListEntry(id, size or size_, csize)
|
||||||
|
|
||||||
def chunk_decref(self, id, stats, wait=True):
|
def chunk_decref(self, id, stats, wait=True):
|
||||||
|
|
Loading…
Reference in a new issue