mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-05 03:27:42 +01:00
Merge pull request #2740 from banjiaojuhao/filer-bugfix-handle_upload_interruption
[bugfix] filer: upload files error
This commit is contained in:
1 file changed
+2
@@ -79,6 +79,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque
|
|||||||
bufPool.Put(bytesBuffer)
|
bufPool.Put(bytesBuffer)
|
||||||
atomic.AddInt64(&bytesBufferCounter, -1)
|
atomic.AddInt64(&bytesBufferCounter, -1)
|
||||||
bytesBufferLimitCond.Signal()
|
bytesBufferLimitCond.Signal()
|
||||||
|
uploadErr = err
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if chunkOffset == 0 && !isAppend {
|
if chunkOffset == 0 && !isAppend {
|
||||||
@@ -126,6 +127,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque
|
|||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
if uploadErr != nil {
|
if uploadErr != nil {
|
||||||
|
fs.filer.DeleteChunks(fileChunks)
|
||||||
return nil, md5Hash, 0, uploadErr, nil
|
return nil, md5Hash, 0, uploadErr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user