[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>
This commit is contained in:
committed by
GitHub
parent
1db7c2b8aa
commit
93007c1842
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user