adjust logging

This commit is contained in:
Chris Lu 2020-12-11 16:57:53 -08:00
parent d986c7196d
commit ae655033ac
2 changed files with 3 additions and 4 deletions

View file

@ -225,8 +225,7 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
} }
if v.lastIoError != nil { if v.lastIoError != nil {
deleteVids = append(deleteVids, v.Id) deleteVids = append(deleteVids, v.Id)
} else { glog.Warningf("volume %d has IO error: %v", v.Id, v.lastIoError)
glog.Warningf("volume %d has IO error", v.Id)
} }
} }
collectionVolumeSize[v.Collection] += volumeMessage.Size collectionVolumeSize[v.Collection] += volumeMessage.Size

View file

@ -205,9 +205,9 @@ func (v *Volume) expired(contentSize uint64, volumeSizeLimit uint64) bool {
if v.Ttl == nil || v.Ttl.Minutes() == 0 { if v.Ttl == nil || v.Ttl.Minutes() == 0 {
return false return false
} }
glog.V(2).Infof("now:%v lastModified:%v", time.Now().Unix(), v.lastModifiedTsSeconds) glog.V(2).Infof("volume %d now:%v lastModified:%v", v.Id, time.Now().Unix(), v.lastModifiedTsSeconds)
livedMinutes := (time.Now().Unix() - int64(v.lastModifiedTsSeconds)) / 60 livedMinutes := (time.Now().Unix() - int64(v.lastModifiedTsSeconds)) / 60
glog.V(2).Infof("ttl:%v lived:%v", v.Ttl, livedMinutes) glog.V(2).Infof("volume %d ttl:%v lived:%v", v.Id, v.Ttl, livedMinutes)
if int64(v.Ttl.Minutes()) < livedMinutes { if int64(v.Ttl.Minutes()) < livedMinutes {
return true return true
} }