aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorliubaojiang <1838095916@qq.com>2022-05-20 18:18:20 +0800
committerliubaojiang <1838095916@qq.com>2022-05-21 10:38:08 +0800
commit076e48a6761396034b6c8132278330593ca698c5 (patch)
tree782b1b6faf7a2305b4692e738cb5d800111188ab /weed/server/volume_server.go
parent71b2e6223e07eaa5d70efdc8ccbe7f39ce6a0169 (diff)
downloadseaweedfs-076e48a6761396034b6c8132278330593ca698c5.tar.xz
seaweedfs-076e48a6761396034b6c8132278330593ca698c5.zip
add inflight upload data wait timeout
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index e557cf76b..abb30229a 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -3,6 +3,7 @@ package weed_server
import (
"net/http"
"sync"
+ "time"
"github.com/chrislusf/seaweedfs/weed/pb"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
@@ -26,6 +27,7 @@ type VolumeServer struct {
concurrentDownloadLimit int64
inFlightUploadDataLimitCond *sync.Cond
inFlightDownloadDataLimitCond *sync.Cond
+ inflightUploadDataTimeout time.Duration
SeedMasterNodes []pb.ServerAddress
currentMaster pb.ServerAddress
@@ -61,6 +63,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
fileSizeLimitMB int,
concurrentUploadLimit int64,
concurrentDownloadLimit int64,
+ inflightUploadDataTimeout time.Duration,
) *VolumeServer {
v := util.GetViper()
@@ -89,6 +92,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
inFlightDownloadDataLimitCond: sync.NewCond(new(sync.Mutex)),
concurrentUploadLimit: concurrentUploadLimit,
concurrentDownloadLimit: concurrentDownloadLimit,
+ inflightUploadDataTimeout: inflightUploadDataTimeout,
}
vs.SeedMasterNodes = masterNodes