Konstantin Lebedev
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
5 deletions
-
weed/filer/filer_deletion.go
-
weed/server/volume_server_handlers_write.go
|
|
@ -58,7 +58,7 @@ func (f *Filer) loopProcessingDeletion() { |
|
|
|
glog.V(0).Infof("deleting fileIds len=%d error: %v", deletionCount, err) |
|
|
|
} |
|
|
|
} 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{} |
|
|
|
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
|
|
|
|
if writeError == nil && isUnchanged { |
|
|
@ -55,10 +58,6 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
httpStatus := http.StatusCreated |
|
|
|
if writeError != nil { |
|
|
|
httpStatus = http.StatusInternalServerError |
|
|
|
ret.Error = writeError.Error() |
|
|
|
} |
|
|
|
if reqNeedle.HasName() { |
|
|
|
ret.Name = string(reqNeedle.Name) |
|
|
|
} |
|
|
|