mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-14 10:08:35 +02: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:
1 parent
666e620b63
commit
ebd6097e6f
1 file changed
+4
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user