aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-11 16:57:53 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-11 16:57:53 -0800
commitae655033ac62a05f6f4e8df388f867207822cbe4 (patch)
treeaab2101464d3406ac7dc078a34147221b102364f
parentd986c7196d96d2c6007f74f599d7809133d8915f (diff)
downloadseaweedfs-ae655033ac62a05f6f4e8df388f867207822cbe4.tar.xz
seaweedfs-ae655033ac62a05f6f4e8df388f867207822cbe4.zip
adjust logging
-rw-r--r--weed/storage/store.go3
-rw-r--r--weed/storage/volume.go4
2 files changed, 3 insertions, 4 deletions
diff --git a/weed/storage/store.go b/weed/storage/store.go
index e64dd8fab..83c40a01a 100644
--- a/weed/storage/store.go
+++ b/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
diff --git a/weed/storage/volume.go b/weed/storage/volume.go
index c726e7f11..7712c5eda 100644
--- a/weed/storage/volume.go
+++ b/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
}