diff --git a/internal/rpc/third/s3.go b/internal/rpc/third/s3.go index de67f01b6..21471e00d 100644 --- a/internal/rpc/third/s3.go +++ b/internal/rpc/third/s3.go @@ -29,8 +29,7 @@ func (t *thirdServer) GetUrl(ctx context.Context, req *third.GetUrlReq) (*third. } func (t *thirdServer) GetHashInfo(ctx context.Context, req *third.GetHashInfoReq) (*third.GetHashInfoResp, error) { - - return nil, nil + return t.s3dataBase.GetHashInfo(ctx, req) } func (t *thirdServer) CleanObject(ctx context.Context, now time.Time) { diff --git a/pkg/common/db/controller/storage.go b/pkg/common/db/controller/storage.go index 60cd317bd..ceedf5d15 100644 --- a/pkg/common/db/controller/storage.go +++ b/pkg/common/db/controller/storage.go @@ -463,6 +463,9 @@ func (c *s3Database) clearNoCitation(ctx context.Context, engine string, limit i } func (c *s3Database) GetHashInfo(ctx context.Context, req *third.GetHashInfoReq) (*third.GetHashInfoResp, error) { + if err := c.CheckHash(req.Hash); err != nil { + return nil, err + } o, err := c.hash.Take(ctx, req.Hash, c.obj.Name()) if err != nil { return nil, err