master: delete partially created replicated volumes during volume growth
fix https://github.com/seaweedfs/seaweedfs/discussions/3792#discussioncomment-3973120
This commit is contained in:
@@ -30,3 +30,15 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.Vol
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func DeleteVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.VolumeId) error {
|
||||
|
||||
return operation.WithVolumeServerClient(false, dn.ServerAddress(), grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
|
||||
|
||||
_, allocateErr := client.VolumeDelete(context.Background(), &volume_server_pb.VolumeDeleteRequest{
|
||||
VolumeId: uint32(vid),
|
||||
})
|
||||
return allocateErr
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user