Files
Janko Thyson a675ac96b9 fix(storage): treat dedupe-candidate cache miss as no candidates, not an error (#4122)
GetAllDedupeReposCandidates propagated zerr.ErrCacheMiss from the cache's
GetAllBlobs verbatim. But a cache miss is the normal case for a not-yet-cached
blob — the first push of a new blob, or a cross-repo mount check during a push
— and semantically means "no dedupe/mount candidates", not a failure.

Propagating it caused canMount (used by the CheckBlob and CreateBlobUpload
handlers) to surface the error, which the route handlers log as an
"unexpected error". With remote (e.g. S3) storage a cache is always present
(dedupe:false does not disable it), so this logs an error-level line for every
fresh blob digest on every push — significant log spam during bulk pushes and
cross-repo mounts, with no functional impact (the push still succeeds via a
normal upload).

Handle ErrCacheMiss the same way as the existing nil-cache branch above:
return no candidates and no error.

Signed-off-by: Janko Thyson <janko@kaosmaps.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 10:24:52 +03:00
..
2026-02-18 23:41:21 -08:00
2026-05-11 09:29:05 +03:00

zot currently supports two types of underlying filesystems:

  1. local - a locally mounted filesystem

  2. remote - a remote filesystem such as AWS S3

The cache database can be configured independently of storage. Right now, zot supports the following database implementations:

  1. BoltDB - local storage. Set the "cloudCache" field in the config file to false. Example: examples/config-boltdb.json