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

Fixes #1354
master
Harshavardhana 9 years ago committed by Anand Babu (AB) Periasamy
parent 10a010c1ad
commit 9eb56f0676
  1. 9
      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

Loading…
Cancel
Save