mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08: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 New Issue
Block a user