Browse Source

adjust logging

pull/1681/head
Chris Lu 4 years ago
parent
commit
ae655033ac
  1. 3
      weed/storage/store.go
  2. 4
      weed/storage/volume.go

3
weed/storage/store.go

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

4
weed/storage/volume.go

@ -205,9 +205,9 @@ func (v *Volume) expired(contentSize uint64, volumeSizeLimit uint64) bool {
if v.Ttl == nil || v.Ttl.Minutes() == 0 {
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
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 {
return true
}

Loading…
Cancel
Save