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

* fix: volume Deadlock when exception is thrown

* adjust log level
This commit is contained in:
famosss 2022-09-07 14:56:29 +08:00 committed by GitHub
parent b324a6536c
commit 5ff33eb558
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)