~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Registry forgets every pending pushed blob once 1024 are staged

Closed
Closed chadtmiller.com opened this issue 0 comments
kind/bugarea/serve

What happened

The registry keeps the blobs pushed and not yet released in Registry::staged (crates/knotless-serve/src/oci.rs). The only bound is bounded() (about line 204): once the map holds MOST_KEPT (1024) entries, it is emptied. Entries are never taken out one by one, not even once their release is made. So the map fills over time, and at some moment it is wiped all at once. That drops every pusher's staged blobs, including those of pushes still under way.

How to see it

Over the server's life, after about 1024 blobs have been pushed across all accounts, the next blob upload clears the map. A docker push that uploaded its blobs just before that point fails at the manifest PUT, because its blobs are no longer staged (staged() misses, and by_digest has no release for them yet). Its blobs stay in the owner's PDS, orphaned. One account can also wipe everyone's staged blobs on purpose by uploading 1024 small blobs.

What you expected

Evict per entry rather than all at once. For example, drop a pusher's staged blobs once their release is made, and evict by age or LRU, or cap each account, so that one push never loses another's.

Where

knotless-serve's OCI registry, on main at b191acef. Found by the docs audit.

🤖 Generated with Claude Code