distribution/registry/storage/cache
Grant Watters 74d442a058
Consider redis.ErrNil as distribution.ErrBlobUnknown for Stat HGET
* Update redis.go

If the dgst key does not exist in the cache when calling HGET, `redis.String` will return an `ErrNil` which we need to translate into `distribution.ErrBlobUnknown` so that the error being returned can be properly handled. This will ensure that `SetDescriptor` is properly called from `cachedBlobStatter::Stat` for `repositoryScopedRedisBlobDescriptorService` which will update the redis cache and be considered as a Miss rather than an Error.

cc @manishtomar

* Update suite.go

Add unit test to ensure missing blobs for scoped repo properly return ErrBlobUnknown when HGET returns redis.ErrNil.

(cherry picked from commit dca6b9526a1d30dd218a9f321c4f84ecc4b5e62e)
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2020-03-04 17:51:37 -08:00
..
cachecheck Consider redis.ErrNil as distribution.ErrBlobUnknown for Stat HGET 2020-03-04 17:51:37 -08:00
memory context: remove definition of Context 2017-08-11 15:53:31 -07:00
metrics redis metrics 2020-03-04 17:51:37 -08:00
redis Consider redis.ErrNil as distribution.ErrBlobUnknown for Stat HGET 2020-03-04 17:51:37 -08:00
cache.go Use "Size" field to describe blobs over "Length" 2015-07-17 17:07:11 -07:00
cache_test.go Add cache unit test 2020-03-04 17:51:37 -08:00
cachedblobdescriptorstore.go fix redis caching issue 2020-03-04 17:51:37 -08:00