mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
more log detail for upload err and deleting (#3577)
This commit is contained in:
parent
01a25755c5
commit
3c3682fcce
|
@ -58,7 +58,7 @@ func (f *Filer) loopProcessingDeletion() {
|
||||||
glog.V(0).Infof("deleting fileIds len=%d error: %v", deletionCount, err)
|
glog.V(0).Infof("deleting fileIds len=%d error: %v", deletionCount, err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
glog.V(2).Infof("deleting fileIds len=%d", deletionCount)
|
glog.V(2).Infof("deleting fileIds %+v", toDeleteFileIds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -46,6 +46,9 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
ret := operation.UploadResult{}
|
ret := operation.UploadResult{}
|
||||||
isUnchanged, writeError := topology.ReplicatedWrite(vs.GetMaster, vs.grpcDialOption, vs.store, volumeId, reqNeedle, r)
|
isUnchanged, writeError := topology.ReplicatedWrite(vs.GetMaster, vs.grpcDialOption, vs.store, volumeId, reqNeedle, r)
|
||||||
|
if writeError != nil {
|
||||||
|
writeJsonError(w, r, http.StatusInternalServerError, writeError)
|
||||||
|
}
|
||||||
|
|
||||||
// http 204 status code does not allow body
|
// http 204 status code does not allow body
|
||||||
if writeError == nil && isUnchanged {
|
if writeError == nil && isUnchanged {
|
||||||
|
@ -55,10 +58,6 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
httpStatus := http.StatusCreated
|
httpStatus := http.StatusCreated
|
||||||
if writeError != nil {
|
|
||||||
httpStatus = http.StatusInternalServerError
|
|
||||||
ret.Error = writeError.Error()
|
|
||||||
}
|
|
||||||
if reqNeedle.HasName() {
|
if reqNeedle.HasName() {
|
||||||
ret.Name = string(reqNeedle.Name)
|
ret.Name = string(reqNeedle.Name)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue