mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix: sequence read rate is slow when use filer.ChunkReadAt.ReadAt #3074
related to https://github.com/chrislusf/seaweedfs/pull/3074
This commit is contained in:
parent
666e620b63
commit
ebd6097e6f
|
@ -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…
Reference in a new issue