mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
use append time instead of filer's own modification time
fix https://github.com/chrislusf/seaweedfs/issues/1669
This commit is contained in:
parent
3fedfec1e7
commit
d986c7196d
|
@ -322,7 +322,7 @@ func (v *Volume) readNeedle(n *needle.Needle, readOption *ReadOption) (int, erro
|
|||
if !n.HasLastModifiedDate() {
|
||||
return bytesRead, nil
|
||||
}
|
||||
if uint64(time.Now().Unix()) < n.LastModified+uint64(ttlMinutes*60) {
|
||||
if time.Now().Before(time.Unix(0, int64(n.AppendAtNs)).Add(time.Duration(ttlMinutes) * time.Minute)) {
|
||||
return bytesRead, nil
|
||||
}
|
||||
return -1, ErrorNotFound
|
||||
|
|
Loading…
Reference in a new issue