From aed6fdffd29aa700241aceab87211aee5467cd82 Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 25 Mar 2024 08:19:31 -0700 Subject: [PATCH] fix nil volume data backend fix https://github.com/seaweedfs/seaweedfs/issues/5417 --- weed/server/volume_grpc_admin.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/server/volume_grpc_admin.go b/weed/server/volume_grpc_admin.go index 8cd6ff949..abd39b582 100644 --- a/weed/server/volume_grpc_admin.go +++ b/weed/server/volume_grpc_admin.go @@ -236,6 +236,9 @@ func (vs *VolumeServer) VolumeStatus(ctx context.Context, req *volume_server_pb. if v == nil { return nil, fmt.Errorf("not found volume id %d", req.VolumeId) } + if v.DataBackend == nil { + return nil, fmt.Errorf("volume %d data backend not found", req.VolumeId) + } volumeSize, _, _ := v.DataBackend.GetStat() resp.IsReadOnly = v.IsReadOnly()