mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix time comparison
This commit is contained in:
parent
bbae13e415
commit
b2e50f602f
|
@ -29,7 +29,7 @@ func (t *TTLFilter) Filter(level int, key, val []byte) (remove bool, newVal []by
|
||||||
entry := filer.Entry{}
|
entry := filer.Entry{}
|
||||||
if err := entry.DecodeAttributesAndChunks(val); err == nil {
|
if err := entry.DecodeAttributesAndChunks(val); err == nil {
|
||||||
if entry.TtlSec == 0 ||
|
if entry.TtlSec == 0 ||
|
||||||
entry.Crtime.Add(time.Duration(entry.TtlSec)*time.Second).Before(time.Now()) {
|
entry.Crtime.Add(time.Duration(entry.TtlSec)*time.Second).After(time.Now()) {
|
||||||
return false, val
|
return false, val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue