diff options
Diffstat (limited to 'weed/server')
| -rw-r--r-- | weed/server/volume_server.go | 6 | ||||
| -rw-r--r-- | weed/server/volume_server_handlers_read.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index 07bb0b9ee..8e20b0846 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -29,7 +29,7 @@ type VolumeServer struct { inFlightDownloadDataLimitCond *sync.Cond inflightUploadDataTimeout time.Duration hasSlowRead bool - readBufferSize int + readBufferSizeMB int SeedMasterNodes []pb.ServerAddress currentMaster pb.ServerAddress @@ -67,7 +67,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, concurrentDownloadLimit int64, inflightUploadDataTimeout time.Duration, hasSlowRead bool, - readBufferSize int, + readBufferSizeMB int, ) *VolumeServer { v := util.GetViper() @@ -98,7 +98,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, concurrentDownloadLimit: concurrentDownloadLimit, inflightUploadDataTimeout: inflightUploadDataTimeout, hasSlowRead: hasSlowRead, - readBufferSize: readBufferSize, + readBufferSizeMB: readBufferSizeMB, } vs.SeedMasterNodes = masterNodes diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go index facdf2556..8ad526d59 100644 --- a/weed/server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -118,7 +118,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) readOption := &storage.ReadOption{ ReadDeleted: r.FormValue("readDeleted") == "true", HasSlowRead: vs.hasSlowRead, - ReadBufferSize: vs.readBufferSize, + ReadBufferSize: vs.readBufferSizeMB * 1024 * 1024, } var count int |
