aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-06-16 01:26:36 -0700
committerchrislu <chris.lu@gmail.com>2022-06-16 01:26:36 -0700
commitaaa9938353a02ca38cfe4a309b857c1ff8f738ca (patch)
treebbe76ee3e9b521a4b93ab9a51b0bd787c1b06412
parente024586ff11d025ce2dd27822a2b04e01260fb6c (diff)
downloadseaweedfs-aaa9938353a02ca38cfe4a309b857c1ff8f738ca.tar.xz
seaweedfs-aaa9938353a02ca38cfe4a309b857c1ff8f738ca.zip
Revert "adjust conditions"
This reverts commit e024586ff11d025ce2dd27822a2b04e01260fb6c.
-rw-r--r--weed/server/volume_server_handlers.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/server/volume_server_handlers.go b/weed/server/volume_server_handlers.go
index f219dc9b9..293f36f14 100644
--- a/weed/server/volume_server_handlers.go
+++ b/weed/server/volume_server_handlers.go
@@ -59,8 +59,7 @@ func (vs *VolumeServer) privateStoreHandler(w http.ResponseWriter, r *http.Reque
contentLength := getContentLength(r)
// exclude the replication from the concurrentUploadLimitMB
- shouldWatchUploadLimit := r.URL.Query().Get("type") != "replicate" && vs.concurrentUploadLimit != 0
- if shouldWatchUploadLimit {
+ if r.URL.Query().Get("type") != "replicate" && vs.concurrentUploadLimit != 0 {
startTime := time.Now()
vs.inFlightUploadDataLimitCond.L.Lock()
for vs.inFlightUploadDataSize > vs.concurrentUploadLimit {
@@ -80,7 +79,7 @@ func (vs *VolumeServer) privateStoreHandler(w http.ResponseWriter, r *http.Reque
atomic.AddInt64(&vs.inFlightUploadDataSize, contentLength)
defer func() {
atomic.AddInt64(&vs.inFlightUploadDataSize, -contentLength)
- if shouldWatchUploadLimit {
+ if vs.concurrentUploadLimit != 0 {
vs.inFlightUploadDataLimitCond.Signal()
}
}()