qieqieplus
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
weed/filer/rocksdb/rocksdb_ttl.go
|
|
@ -29,7 +29,7 @@ func (t *TTLFilter) Filter(level int, key, val []byte) (remove bool, newVal []by |
|
|
|
entry := filer.Entry{} |
|
|
|
if err := entry.DecodeAttributesAndChunks(val); err == nil { |
|
|
|
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 |
|
|
|
} |
|
|
|
} |
|
|
|