Add missing error check in cache GetObjectNInfo (#8889)

This commit is contained in:
poornas 2020-01-24 15:49:16 -08:00 committed by kannappanr
parent cf37c7997e
commit a78e5d4763

View File

@ -284,6 +284,9 @@ func (c *cacheObjects) GetObjectNInfo(ctx context.Context, bucket, object string
}
bkReader, bkErr := c.GetObjectNInfoFn(ctx, bucket, object, rs, h, lockType, opts)
if bkErr != nil {
return bkReader, bkErr
}
// Record if cache has a hit that was invalidated by ETag verification
if cacheErr == nil {
bkReader.ObjInfo.CacheLookupStatus = CacheHit