Skip to content

fix(blobrefresh): deduplicate download requests for blobs under different namespaces#610

Merged
Anton-Kalpakchiev merged 1 commit into
masterfrom
fix-dedup-in-refresher
May 1, 2026
Merged

fix(blobrefresh): deduplicate download requests for blobs under different namespaces#610
Anton-Kalpakchiev merged 1 commit into
masterfrom
fix-dedup-in-refresher

Conversation

@Anton-Kalpakchiev
Copy link
Copy Markdown
Collaborator

@Anton-Kalpakchiev Anton-Kalpakchiev commented Apr 30, 2026

When origin downloads blobs from GCS, it deduplicates simultaneous downloads for the same blob to avoid extra load. It deduplicates based on an id defined to be the blob's namespace + digest. However, this is wrong - if the same blob is being requested under 2 different namespaces, it will have 2 different IDs and deduplication will fail. This PR fixes that by changing the id of a download blob request to be the blob's digest, instead of namespace+digest. I also add a unit test that would have caught the bug.

This issue has been happening for 8+ years, but we just caught it because of this log message.

Comment thread lib/blobrefresh/refresher.go
@Anton-Kalpakchiev Anton-Kalpakchiev merged commit d1b81b4 into master May 1, 2026
10 checks passed
@Anton-Kalpakchiev Anton-Kalpakchiev deleted the fix-dedup-in-refresher branch May 1, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants