aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2025-07-03 06:03:49 +0500
committerGitHub <noreply@github.com>2025-07-02 18:03:49 -0700
commit93007c1842679c0ffb644fdef0d9126671ad82d2 (patch)
treec3821e67620c48aed95c49332ac3cc5654166bd0 /weed/server/volume_server.go
parent1db7c2b8aad59177f9ccb32f156908faf0c13eca (diff)
downloadseaweedfs-93007c1842679c0ffb644fdef0d9126671ad82d2.tar.xz
seaweedfs-93007c1842679c0ffb644fdef0d9126671ad82d2.zip
[volume] refactor and add metrics for flight upload and download data limit condition (#6920)
* refactor concurrentDownloadLimit * fix loop * fix cmdServer * fix: resolve conversation pr 6920 * Changes logging function (#6919) * updated logging methods for stores * updated logging methods for stores * updated logging methods for filer * updated logging methods for uploader and http_util * updated logging methods for weed server --------- Co-authored-by: akosov <a.kosov@kryptonite.ru> * Improve lock ring (#6921) * fix flaky lock ring test * add more tests * fix: build * fix: rm import util/version * fix: serverOptions * refactoring --------- Co-authored-by: Aleksey Kosov <rusyak777@list.ru> Co-authored-by: akosov <a.kosov@kryptonite.ru> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: chrislu <chris.lu@gmail.com>
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index 5c5ebc49a..89414afc9 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -28,6 +28,7 @@ type VolumeServer struct {
inFlightUploadDataLimitCond *sync.Cond
inFlightDownloadDataLimitCond *sync.Cond
inflightUploadDataTimeout time.Duration
+ inflightDownloadDataTimeout time.Duration
hasSlowRead bool
readBufferSizeMB int
@@ -68,6 +69,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
concurrentUploadLimit int64,
concurrentDownloadLimit int64,
inflightUploadDataTimeout time.Duration,
+ inflightDownloadDataTimeout time.Duration,
hasSlowRead bool,
readBufferSizeMB int,
ldbTimeout int64,
@@ -133,6 +135,9 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
publicMux.HandleFunc("/", requestIDMiddleware(vs.publicReadOnlyHandler))
}
+ stats.VolumeServerConcurrentDownloadLimit.Set(float64(vs.concurrentDownloadLimit))
+ stats.VolumeServerConcurrentUploadLimit.Set(float64(vs.concurrentUploadLimit))
+
go vs.heartbeat()
go stats.LoopPushingMetric("volumeServer", util.JoinHostPort(ip, port), vs.metricsAddress, vs.metricsIntervalSec)