XL: Cache: Purging partially cached content upon erasureReadFile failure (#2104)

master
karthic rao 9 years ago committed by Harshavardhana
parent d6dfcd0ba7
commit a35341448f
  1. 2
      xl-v1-object.go

@ -153,6 +153,8 @@ func (xl xlObjects) GetObject(bucket, object string, startOffset int64, length i
// Start reading the part name.
n, err := erasureReadFile(mw, onlineDisks, bucket, pathJoin(object, partName), partName, eInfos, partOffset, readSize, partSize)
if err != nil {
// Purge the partial object upon any error.
xl.objCache.Delete(path.Join(bucket, object))
return err
}

Loading…
Cancel
Save