Skip to content

Commit

Permalink
Make BatchDownload honour maxSize when uploading to redis. (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
fische authored Apr 29, 2024
1 parent f152c8d commit 947353e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
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

0 comments on commit 947353e

Please sign in to comment.