From d65fb64a8e139b2e654942d39cc6ff31db82e94d Mon Sep 17 00:00:00 2001 From: Oron Sharabi Date: Mon, 22 Aug 2022 19:41:18 +0300 Subject: [PATCH] Multiply maxResolution by 1000 in grpc api Signed-off-by: Oron Sharabi --- pkg/api/query/grpc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/api/query/grpc.go b/pkg/api/query/grpc.go index 16009914ec..4b2dde66ae 100644 --- a/pkg/api/query/grpc.go +++ b/pkg/api/query/grpc.go @@ -62,7 +62,7 @@ func (g *GRPCAPI) Query(request *querypb.QueryRequest, server querypb.Query_Quer maxResolution = g.defaultMaxResolutionSeconds.Milliseconds() / 1000 } - lookbackDelta := g.lookbackDeltaCreate(maxResolution) + lookbackDelta := g.lookbackDeltaCreate(maxResolution * 1000) if request.LookbackDeltaSeconds > 0 { lookbackDelta = time.Duration(request.LookbackDeltaSeconds) * time.Second } @@ -136,7 +136,7 @@ func (g *GRPCAPI) QueryRange(request *querypb.QueryRangeRequest, srv querypb.Que maxResolution = g.defaultMaxResolutionSeconds.Milliseconds() / 1000 } - lookbackDelta := g.lookbackDeltaCreate(maxResolution) + lookbackDelta := g.lookbackDeltaCreate(maxResolution * 1000) if request.LookbackDeltaSeconds > 0 { lookbackDelta = time.Duration(request.LookbackDeltaSeconds) * time.Second }