diff options
| author | chrislu <chris.lu@gmail.com> | 2022-03-21 00:41:44 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-03-21 00:41:44 -0700 |
| commit | ae558fa0731ac3c45a8e5a71117066c3d9509e5b (patch) | |
| tree | f4ec79c0e9fe4cf9443892b9cdbf9519ceb27ff0 | |
| parent | 57c6eddd223875b6a1ed04cc87c00b9188f745b7 (diff) | |
| download | seaweedfs-ae558fa0731ac3c45a8e5a71117066c3d9509e5b.tar.xz seaweedfs-ae558fa0731ac3c45a8e5a71117066c3d9509e5b.zip | |
log reasons volumes became unwritable
| -rw-r--r-- | weed/topology/volume_layout.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go index 64e196032..de840f18f 100644 --- a/weed/topology/volume_layout.go +++ b/weed/topology/volume_layout.go @@ -218,6 +218,13 @@ func (vl *VolumeLayout) ensureCorrectWritables(vid needle.VolumeId) { vl.setVolumeWritable(vid) } } else { + if !vl.enoughCopies(vid) { + glog.V(0).Infof("volume %d does not have enough copies", vid) + } + if !vl.isAllWritable(vid) { + glog.V(0).Infof("volume %d are not all writable", vid) + } + glog.V(0).Infof("volume %d remove from writable", vid) vl.removeFromWritable(vid) } } @@ -433,7 +440,7 @@ func (vl *VolumeLayout) SetVolumeCapacityFull(vid needle.VolumeId) bool { vl.accessLock.Lock() defer vl.accessLock.Unlock() - // glog.V(0).Infoln("Volume", vid, "reaches full capacity.") + glog.V(0).Infof("Volume %d reaches full capacity.", vid) return vl.removeFromWritable(vid) } |
