mirror of
https://github.com/minio/minio.git
synced 2025-04-18 09:50:02 -04:00
cache: do not evict entry on ErrClosedPipe (#8432)
Fixes: #8431. If client prematurely closes the read end of the pipe, cache entry should not be evicted.
This commit is contained in:
parent
40fcd3dc48
commit
f01d53b20f
@ -583,8 +583,9 @@ func (c *diskCache) bitrotReadFromCache(ctx context.Context, filePath string, of
|
|||||||
if _, err := io.Copy(writer, bytes.NewReader((*bufp)[blockOffset:blockOffset+blockLength])); err != nil {
|
if _, err := io.Copy(writer, bytes.NewReader((*bufp)[blockOffset:blockOffset+blockLength])); err != nil {
|
||||||
if err != io.ErrClosedPipe {
|
if err != io.ErrClosedPipe {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
return err
|
eof = true
|
||||||
}
|
}
|
||||||
if eof {
|
if eof {
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user