Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make BatchDownload honour maxSize when uploading to redis. #306

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 11.9.12
--------------
* Make BatchDownload honour maxSize when uploading to redis.

Version 11.9.11
--------------
* Allow setting pool timeout on redis client.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.9.11
11.9.12
4 changes: 3 additions & 1 deletion mettle/worker/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ func (r *elanRedisWrapper) BatchDownload(dgs []digest.Digest) (map[digest.Digest
uploads := make([]interface{}, 0, 2*len(m))
for k, v := range m {
ret[k] = v
uploads = append(uploads, k.Hash, v)
if k.Size < r.maxSize {
uploads = append(uploads, k.Hash, v)
}
}
go r.writeBlobs(uploads)
return ret, nil
Expand Down
Loading