tolerate missing chunks with delete --force

if a chunk is missing in repo, it will also be missing in a ad-hoc
built chunks index.
This commit is contained in:
Thomas Waldmann 2023-09-23 13:41:46 +02:00
parent 62289ff513
commit 186d536d55
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01
1 changed files with 5 additions and 2 deletions

View File

@ -1056,8 +1056,11 @@ Duration: {0.duration}
try:
self.cache.chunk_decref(id, size, stats, wait=False)
except KeyError:
cid = bin_to_hex(id)
raise ChunksIndexError(cid)
nonlocal error
if forced == 0:
cid = bin_to_hex(id)
raise ChunksIndexError(cid)
error = True
else:
fetch_async_response(wait=False)