diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-10-29 00:12:20 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-28 12:12:20 -0700 |
| commit | 764d9cb1059e5210927c7faca79012578fe69119 (patch) | |
| tree | c5eb13bff6439a766ea6297c0e866525d7ec11ea /weed/shell/commands.go | |
| parent | f9f499b8d5929fb1fd6e26261c4bba83eb20b525 (diff) | |
| download | seaweedfs-764d9cb1059e5210927c7faca79012578fe69119.tar.xz seaweedfs-764d9cb1059e5210927c7faca79012578fe69119.zip | |
[voluche.chek.disk] needles older than the cutoff time are not missing yet (#3922)
needles older than the cutoff time are not missing yet
https://github.com/seaweedfs/seaweedfs/issues/3919
Diffstat (limited to 'weed/shell/commands.go')
| -rw-r--r-- | weed/shell/commands.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/weed/shell/commands.go b/weed/shell/commands.go index 87aeed2bb..66fdcb6bd 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -1,7 +1,11 @@ package shell import ( + "context" "fmt" + "github.com/seaweedfs/seaweedfs/weed/operation" + "github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" + "github.com/seaweedfs/seaweedfs/weed/storage/needle_map" "io" "net/url" "strconv" @@ -148,3 +152,20 @@ func findInputDirectory(args []string) (input string) { } return input } + +func readNeedleMeta(grpcDialOption grpc.DialOption, volumeServer pb.ServerAddress, volumeId uint32, needleValue needle_map.NeedleValue) (resp *volume_server_pb.ReadNeedleMetaResponse, err error) { + err = operation.WithVolumeServerClient(false, volumeServer, grpcDialOption, + func(client volume_server_pb.VolumeServerClient) error { + if resp, err = client.ReadNeedleMeta(context.Background(), &volume_server_pb.ReadNeedleMetaRequest{ + VolumeId: volumeId, + NeedleId: uint64(needleValue.Key), + Offset: needleValue.Offset.ToActualOffset(), + Size: int32(needleValue.Size), + }); err != nil { + return err + } + return nil + }, + ) + return +} |
