aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server_handlers.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-03-24 13:54:42 +0500
committerKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-03-24 13:54:42 +0500
commit0b790d2bbf1e0863e85abc5510d09620a7f38d8f (patch)
tree00b8889139ebf3592361b534c5d5fa5418aae865 /weed/server/volume_server_handlers.go
parent9b04f17555a3876ccb730d07b696c99b69032e99 (diff)
downloadseaweedfs-0b790d2bbf1e0863e85abc5510d09620a7f38d8f.tar.xz
seaweedfs-0b790d2bbf1e0863e85abc5510d09620a7f38d8f.zip
exclude the replication from the concurrentUploadLimitMB
Diffstat (limited to 'weed/server/volume_server_handlers.go')
-rw-r--r--weed/server/volume_server_handlers.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/server/volume_server_handlers.go b/weed/server/volume_server_handlers.go
index 1ff0914a9..2dc7f6741 100644
--- a/weed/server/volume_server_handlers.go
+++ b/weed/server/volume_server_handlers.go
@@ -52,7 +52,10 @@ func (vs *VolumeServer) privateStoreHandler(w http.ResponseWriter, r *http.Reque
// wait until in flight data is less than the limit
contentLength := getContentLength(r)
- if vs.concurrentUploadLimit != 0 && atomic.LoadInt64(&vs.inFlightUploadDataSize) > vs.concurrentUploadLimit {
+
+ // exclude the replication from the concurrentUploadLimitMB
+ if vs.concurrentUploadLimit != 0 && r.URL.Query().Get("type") != "replicate" &&
+ atomic.LoadInt64(&vs.inFlightUploadDataSize) > vs.concurrentUploadLimit {
err := fmt.Errorf("reject because inflight upload data %d > %d", vs.inFlightUploadDataSize, vs.concurrentUploadLimit)
glog.V(1).Infof("too many requests: %v", err)
writeJsonError(w, r, http.StatusTooManyRequests, err)