aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-15 03:11:32 -0700
committerchrislu <chris.lu@gmail.com>2022-09-15 03:11:32 -0700
commit896a85d6e4858a48018fcb7fc41026fcb3861dea (patch)
treec104b8952796015daccd4e7e2b931ad7ce259d77 /weed/server/volume_server.go
parent21c058790010aa9224568248f2d9bf9c324b6747 (diff)
downloadseaweedfs-896a85d6e4858a48018fcb7fc41026fcb3861dea.tar.xz
seaweedfs-896a85d6e4858a48018fcb7fc41026fcb3861dea.zip
volume: add "hasSlowRead" option to customize read optimization
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 46bf746f7..8bf50ce45 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
+ hasSlowRead bool
SeedMasterNodes []pb.ServerAddress
currentMaster pb.ServerAddress
@@ -64,6 +65,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
concurrentUploadLimit int64,
concurrentDownloadLimit int64,
inflightUploadDataTimeout time.Duration,
+ hasSlowRead bool,
) *VolumeServer {
v := util.GetViper()
@@ -93,6 +95,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
concurrentUploadLimit: concurrentUploadLimit,
concurrentDownloadLimit: concurrentDownloadLimit,
inflightUploadDataTimeout: inflightUploadDataTimeout,
+ hasSlowRead: hasSlowRead,
}
vs.SeedMasterNodes = masterNodes