zot: [Bug]: Possible eventual consistency issue with s3-compatible storage

zot version

v2.1.3-rc1

Describe the bug

statistics failed to update on pushing image with error :

{"level":"error","error":"s3aws: Path not found: /debian/blobs/sha256/b3224714157dcbb064909ad2345250fe030eab3e9a82350945fe1ee37b5e452b","blob":"/debian/blobs/sha256/b3224714157dcbb064909ad2345250fe030eab3e9a82350945fe1ee37b5e452b","goroutine":74906,"caller":"zotregistry.dev/zot/pkg/storage/imagestore/imagestore.go:1487","time":"2025-01-26T22:16:36.516428956Z","message":"failed to stat blob"}

after moment the blob is on its place, but it is too late for stat updater:

swift download registry debian/blobs/sha256/b3224714157dcbb064909ad2345250fe030eab3e9a82350945fe1ee37b5e452b
debian/blobs/sha256/b3224714157dcbb064909ad2345250fe030eab3e9a82350945fe1ee37b5e452b [auth 0.006s, headers 0.011s, total 0.011s, 0.089 MB/s]

Storage responding 201 on blob creation, but it is returning 404 several time because of eventual consistency Supposing the same case with minio-s3 in case of distributed reading and writing on cluster. May be there is a method to update statistics in async manner? Asking this because there are no problems if image synced from external registry with sync plugin

To reproduce

  1. Configuration Openstack swift in s3 mode
  2. Client tool used docker 24
  3. Seen error no error, image pushed, but statistics remain not updated

Expected behavior

statistics updated

Screenshots

No response

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 31 (10 by maintainers)

Most upvoted comments

Also, keep the configurations on all zot replicas as identical as possible.

Pls also take a look at this. https://zotregistry.dev/v2.1.2/articles/scaleout/

For dedupe false ZotBlobTable is expected to be empty as it is not used. In any case it has no relation to the statistics.

is it possible to set dedupe true on one node and disable on the second?

NO! Dedupe replaces some blobs with empty content in storage in order to save space. If they share the same storage, then the images would be unusable.

For dedupe false ZotBlobTable is expected to be empty as it is not used. In any case it has no relation to the statistics.