aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-08-20 09:39:35 -0700
committerchrislu <chris.lu@gmail.com>2024-08-20 09:39:35 -0700
commitb3696024d118fd13aff0fc5e94010ee3d17d4dc9 (patch)
tree8cb215744c1d660836b9fa9a8bd2f35174ab9c22
parentad5a62578147605e27efc282efef39153b8d1794 (diff)
downloadseaweedfs-b3696024d118fd13aff0fc5e94010ee3d17d4dc9.tar.xz
seaweedfs-b3696024d118fd13aff0fc5e94010ee3d17d4dc9.zip
add warning for not enough copies when skipping vacuuming volumes
fix https://github.com/seaweedfs/seaweedfs/issues/5906
-rw-r--r--weed/topology/topology_vacuum.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/topology/topology_vacuum.go b/weed/topology/topology_vacuum.go
index f5b1eaaff..b1a8b66d4 100644
--- a/weed/topology/topology_vacuum.go
+++ b/weed/topology/topology_vacuum.go
@@ -270,7 +270,11 @@ func (t *Topology) vacuumOneVolumeId(grpcDialOption grpc.DialOption, volumeLayou
isEnoughCopies := volumeLayout.enoughCopies(vid)
volumeLayout.accessLock.RUnlock()
- if isReadOnly || !isEnoughCopies {
+ if isReadOnly {
+ return
+ }
+ if !isEnoughCopies {
+ glog.Warningf("skip vacuuming: not enough copies for volume:%d", vid)
return
}