0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-01-06 22:40:28 -05:00
zot/pkg/storage
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
..
BUILD.bazel gc: add a policy to skip garbage collecting new blobs 2020-07-06 15:52:35 -07:00
cache.go Upgraded build pipeline 2020-06-25 23:43:31 -07:00
cache_test.go dedupe: record relative path for cache entries 2020-05-27 22:11:26 -07:00
storage.go Using "destRecord" as a path in DeleteBlob function instead of "dst". 2020-08-12 10:06:20 -07:00
storage_test.go stacker: fix stacker build 2020-07-14 13:31:57 -07:00