refactor(storage): add a common blobstore to store all blobs (#4136)

* feat(storage): add a common blobstore to store all blobs (#3906)

Currently, zot uses one of the existing repos as the master copy for a blob to
achieve dedupe, which complicates dedupe tracking logic. Furthermore, we
have a global storage lock which is becoming a bottleneck. In order to
move to a per-repo lock, we first need to simplify this logic.

Now use a single hidden global repo (_blobstore/) as a blob store instead.

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* fix(storage): address blobstore cache correctness issues

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
This commit is contained in:
Ramkumar Chinchani
2026-06-16 15:30:37 -07:00
committed by GitHub
parent 55b68228da
commit 10dcd182f6
21 changed files with 1219 additions and 445 deletions
+2
View File
@@ -91,6 +91,8 @@ var (
ErrInvalidRoute = errors.New("invalid route prefix")
ErrImgStoreNotFound = errors.New("image store not found corresponding to given route")
ErrLocalImgStoreNotFound = errors.New("local image store not found corresponding to given route")
ErrDefaultImgStoreCreate = errors.New("failed to create image store for default config")
ErrSubpathImgStoreCreate = errors.New("failed to create image store for subpath")
ErrEmptyValue = errors.New("empty cache value")
ErrEmptyRepoList = errors.New("no repository found")
ErrCVESearchDisabled = errors.New("cve search is disabled")