Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix: volume Deadlock when exception is thrown (#3613)

famosss5ff33eb558fd
diff --git a/weed/server/volume_server_handlers.go b/weed/server/volume_server_handlers.go
index eec78a7db3..dcb92aa6b3 100644
--- a/weed/server/volume_server_handlers.go
+++ b/weed/server/volume_server_handlers.go
@@ -50,6 +50,8 @@ func (vs *VolumeServer) privateStoreHandler(w http.ResponseWriter, r *http.Reque
select {
case <-r.Context().Done():
glog.V(4).Infof("request cancelled from %s: %v", r.RemoteAddr, r.Context().Err())
+ w.WriteHeader(http.StatusInternalServerError)
+ vs.inFlightDownloadDataLimitCond.L.Unlock()
return
default:
glog.V(4).Infof("wait because inflight download data %d > %d", inFlightDownloadSize, vs.concurrentDownloadLimit)