filer: support TTL for all filer stores
This commit is contained in:
@@ -180,9 +180,9 @@ func (v *Volume) expired(volumeSizeLimit uint64) bool {
|
||||
if v.Ttl == nil || v.Ttl.Minutes() == 0 {
|
||||
return false
|
||||
}
|
||||
glog.V(1).Infof("now:%v lastModified:%v", time.Now().Unix(), v.lastModifiedTsSeconds)
|
||||
glog.V(2).Infof("now:%v lastModified:%v", time.Now().Unix(), v.lastModifiedTsSeconds)
|
||||
livedMinutes := (time.Now().Unix() - int64(v.lastModifiedTsSeconds)) / 60
|
||||
glog.V(1).Infof("ttl:%v lived:%v", v.Ttl, livedMinutes)
|
||||
glog.V(2).Infof("ttl:%v lived:%v", v.Ttl, livedMinutes)
|
||||
if int64(v.Ttl.Minutes()) < livedMinutes {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user