xl/healFile: Handle errors and continue (#1425)

Fixes #1354
This commit is contained in:
Harshavardhana 2016-04-29 17:52:49 -07:00 committed by Anand Babu (AB) Periasamy
parent 10a010c1ad
commit 9eb56f0676

View File

@ -90,9 +90,8 @@ func (xl XL) healFile(volume string, path string) error {
"volume": volume,
"path": path,
}).Errorf("CreateFile failed with error %s", err)
// Unexpected error
closeAndRemoveWriters(writers...)
return err
safeCloseAndRemove(writers[index])
continue
}
}
var totalLeft = metadata.Stat.Size
@ -191,8 +190,8 @@ func (xl XL) healFile(volume string, path string) error {
"volume": volume,
"path": path,
}).Errorf("Write failed with %s", err)
closeAndRemoveWriters(writers...)
return err
safeCloseAndRemove(writers[index])
continue
}
}
totalLeft = totalLeft - metadata.Erasure.BlockSize