diff options
| author | liubaojiang <1838095916@qq.com> | 2022-05-20 18:18:20 +0800 |
|---|---|---|
| committer | liubaojiang <1838095916@qq.com> | 2022-05-21 10:38:08 +0800 |
| commit | 076e48a6761396034b6c8132278330593ca698c5 (patch) | |
| tree | 782b1b6faf7a2305b4692e738cb5d800111188ab /weed/command/volume.go | |
| parent | 71b2e6223e07eaa5d70efdc8ccbe7f39ce6a0169 (diff) | |
| download | seaweedfs-076e48a6761396034b6c8132278330593ca698c5.tar.xz seaweedfs-076e48a6761396034b6c8132278330593ca698c5.zip | |
add inflight upload data wait timeout
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go index b1455352c..158bdf162 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -65,7 +65,8 @@ type VolumeServerOptions struct { preStopSeconds *int metricsHttpPort *int // pulseSeconds *int - enableTcp *bool + enableTcp *bool + inflightUploadDataTimeout *time.Duration } func init() { @@ -96,6 +97,7 @@ func init() { v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port") v.idxFolder = cmdVolume.Flag.String("dir.idx", "", "directory to store .idx files") v.enableTcp = cmdVolume.Flag.Bool("tcp", false, "<experimental> enable tcp port") + v.inflightUploadDataTimeout = cmdVolume.Flag.Duration("inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers") } var cmdVolume = &Command{ @@ -244,6 +246,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v *v.fileSizeLimitMB, int64(*v.concurrentUploadLimitMB)*1024*1024, int64(*v.concurrentDownloadLimitMB)*1024*1024, + *v.inflightUploadDataTimeout, ) // starting grpc server grpcS := v.startGrpcService(volumeServer) |
