From 9eb56f067654216ad42e895a7b20d2132a21936a Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 29 Apr 2016 17:52:49 -0700 Subject: [PATCH] xl/healFile: Handle errors and continue (#1425) Fixes #1354 --- xl-erasure-v1-healfile.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xl-erasure-v1-healfile.go b/xl-erasure-v1-healfile.go index 31419d386..be9933e6a 100644 --- a/xl-erasure-v1-healfile.go +++ b/xl-erasure-v1-healfile.go @@ -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