Browse Source

fix: sequence read rate is slow when use filer.ChunkReadAt.ReadAt #3074

related to https://github.com/chrislusf/seaweedfs/pull/3074
pull/3154/head
chrislu 3 years ago
parent
commit
ebd6097e6f
  1. 6
      weed/filer/reader_pattern.go

6
weed/filer/reader_pattern.go

@ -16,15 +16,17 @@ func NewReaderPattern() *ReaderPattern {
}
func (rp *ReaderPattern) MonitorReadAt(offset int64, size int) {
isStreaming := true
if rp.lastReadOffset > offset {
rp.isStreaming = false
isStreaming = false
}
if rp.lastReadOffset == -1 {
if offset != 0 {
rp.isStreaming = false
isStreaming = false
}
}
rp.lastReadOffset = offset
rp.isStreaming = isStreaming
}
func (rp *ReaderPattern) IsStreamingMode() bool {

Loading…
Cancel
Save