aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorfamosss <zzq09494@ly.com>2022-09-16 15:30:40 +0800
committerGitHub <noreply@github.com>2022-09-16 00:30:40 -0700
commitd949a238b83dc05fe79a1fb02a047a25355feb7b (patch)
tree11cfe94e1ee8c09bfe5f67716987e62e1edc3f39 /weed/server/volume_server.go
parentcf90f76a35df8c8509ad3ccece566ecb0b74cf66 (diff)
downloadseaweedfs-d949a238b83dc05fe79a1fb02a047a25355feb7b.tar.xz
seaweedfs-d949a238b83dc05fe79a1fb02a047a25355feb7b.zip
volume: add "readBufSize" option to customize read optimization (#3702)
* simplify a bit * feat: volume: add "readBufSize" option to customize read optimization * refactor : redbufSIze -> readBufferSize * simplify a bit * simplify a bit
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index 8bf50ce45..07bb0b9ee 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -29,6 +29,7 @@ type VolumeServer struct {
inFlightDownloadDataLimitCond *sync.Cond
inflightUploadDataTimeout time.Duration
hasSlowRead bool
+ readBufferSize int
SeedMasterNodes []pb.ServerAddress
currentMaster pb.ServerAddress
@@ -66,6 +67,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
concurrentDownloadLimit int64,
inflightUploadDataTimeout time.Duration,
hasSlowRead bool,
+ readBufferSize int,
) *VolumeServer {
v := util.GetViper()
@@ -96,6 +98,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
concurrentDownloadLimit: concurrentDownloadLimit,
inflightUploadDataTimeout: inflightUploadDataTimeout,
hasSlowRead: hasSlowRead,
+ readBufferSize: readBufferSize,
}
vs.SeedMasterNodes = masterNodes