0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-02-17 23:45:36 -05:00
zot/pkg
Shivam Mishra 3a30290e08 Using "destRecord" as a path in DeleteBlob function instead of "dst".
dstRecord :- blob path stored in cache.
dst :- blob path that is trying to be uploaded.

Currently, if the actual blob on disk may have been removed by GC/delete, during syncing the cache dst is being passed to DeleteBlob function and retry section is being continuously called because DeleteBlob function never deletes dst path (doesn't exist in db), dstRecord should be passed into DeleteBlob function because dstRecord is actual blob path stored in db.

If dst and dstRecord path value is same then this issue will not be produced and DeleteBlob method will delete the blob info from cache but if both are different then DeleteBlob method will try to delete dst path which is not in cache.

Note:- boltdb delete method return nil even when value doesn't exist (https://godoc.org/github.com/boltdb/bolt#Bucket.Delete)
2020-08-12 10:06:20 -07:00
..
api auth: support a read-only mode 2020-07-10 21:48:35 -07:00
cli cli: add option to ignore TLS verification 2020-07-17 17:48:42 -04:00
compliance Upgraded build pipeline 2020-06-25 23:43:31 -07:00
log Upgraded build pipeline 2020-06-25 23:43:31 -07:00
storage Using "destRecord" as a path in DeleteBlob function instead of "dst". 2020-08-12 10:06:20 -07:00