diff options
| author | dsd <60881537+dsd2077@users.noreply.github.com> | 2024-12-19 03:56:40 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-18 11:56:40 -0800 |
| commit | 72af97162fa4b76557c9160a3809b0a9dd67cbbd (patch) | |
| tree | 7eee795f9de27a2557907ddbd81893f154902d77 /weed/server | |
| parent | 9fbc4ea417d7af358270a53fdd4f7f37a37d82d0 (diff) | |
| download | seaweedfs-72af97162fa4b76557c9160a3809b0a9dd67cbbd.tar.xz seaweedfs-72af97162fa4b76557c9160a3809b0a9dd67cbbd.zip | |
[shell] feat:stop vacuum immediately once volume.vacuum.disable was executed (#6375)
stop vacuum immediately once volume.vacuum.disable was executed
Co-authored-by: dsd <dsd2019@foxmail.com>
Diffstat (limited to 'weed/server')
| -rw-r--r-- | weed/server/master_grpc_server_volume.go | 2 | ||||
| -rw-r--r-- | weed/server/master_server_handlers_admin.go | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/weed/server/master_grpc_server_volume.go b/weed/server/master_grpc_server_volume.go index 24e9c058c..3a383e259 100644 --- a/weed/server/master_grpc_server_volume.go +++ b/weed/server/master_grpc_server_volume.go @@ -271,7 +271,7 @@ func (ms *MasterServer) VacuumVolume(ctx context.Context, req *master_pb.VacuumV resp := &master_pb.VacuumVolumeResponse{} - ms.Topo.Vacuum(ms.grpcDialOption, float64(req.GarbageThreshold), ms.option.MaxParallelVacuumPerServer, req.VolumeId, req.Collection, ms.preallocateSize) + ms.Topo.Vacuum(ms.grpcDialOption, float64(req.GarbageThreshold), ms.option.MaxParallelVacuumPerServer, req.VolumeId, req.Collection, ms.preallocateSize, false) return resp, nil } diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index 452a4194e..fb0503e33 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -3,12 +3,13 @@ package weed_server import ( "context" "fmt" - "github.com/seaweedfs/seaweedfs/weed/pb" - "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" "math/rand/v2" "net/http" "strconv" + "github.com/seaweedfs/seaweedfs/weed/pb" + "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" + "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/operation" "github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" @@ -66,7 +67,7 @@ func (ms *MasterServer) volumeVacuumHandler(w http.ResponseWriter, r *http.Reque } } // glog.Infoln("garbageThreshold =", gcThreshold) - ms.Topo.Vacuum(ms.grpcDialOption, gcThreshold, ms.option.MaxParallelVacuumPerServer, 0, "", ms.preallocateSize) + ms.Topo.Vacuum(ms.grpcDialOption, gcThreshold, ms.option.MaxParallelVacuumPerServer, 0, "", ms.preallocateSize, false) ms.dirStatusHandler(w, r) } |
