aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-17 19:37:46 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-17 19:37:46 -0800
commit738c4fd20363a329541d5b7f85d52e102c57e989 (patch)
treeab7db293f67ab80a70e5ff0db2c0ca7bb5ca998d
parente2076201d79e84df0407a9e1e535bf966452bba0 (diff)
downloadseaweedfs-738c4fd20363a329541d5b7f85d52e102c57e989.tar.xz
seaweedfs-738c4fd20363a329541d5b7f85d52e102c57e989.zip
fix logging when error
address https://github.com/chrislusf/seaweedfs/pull/1685#issuecomment-747845601
-rw-r--r--weed/storage/store.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/storage/store.go b/weed/storage/store.go
index 83c40a01a..ff28be47c 100644
--- a/weed/storage/store.go
+++ b/weed/storage/store.go
@@ -257,12 +257,12 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
location.volumesLock.Lock()
for _, vid := range deleteVids {
found, err := location.deleteVolumeById(vid)
- if found {
- if err == nil {
+ if err == nil {
+ if found {
glog.V(0).Infof("volume %d is deleted", vid)
- } else {
- glog.V(0).Infof("delete volume %d: %v", vid, err)
}
+ } else {
+ glog.V(0).Infof("delete volume %d: %v", vid, err)
}
}
location.volumesLock.Unlock()