Skip to content

Commit

Permalink
Merge pull request #11 from vinted/v0.28.0+vinted_2
Browse files Browse the repository at this point in the history
Revert "query: Close() after using query (thanos-io#5410)"
  • Loading branch information
GiedriusS committed Aug 10, 2022
2 parents e3f8229 + 5f2fde8 commit 31cd60a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions pkg/api/query/grpc.go
Expand Up @@ -84,7 +84,6 @@ func (g *GRPCAPI) Query(request *querypb.QueryRequest, server querypb.Query_Quer
if err != nil {
return err
}
defer qry.Close()

result := qry.Exec(ctx)
if err := server.Send(querypb.NewQueryWarningsResponse(result.Warnings)); err != nil {
Expand Down Expand Up @@ -158,7 +157,6 @@ func (g *GRPCAPI) QueryRange(request *querypb.QueryRangeRequest, srv querypb.Que
if err != nil {
return err
}
defer qry.Close()

result := qry.Exec(ctx)
if err := srv.Send(querypb.NewQueryRangeWarningsResponse(result.Warnings)); err != nil {
Expand Down
2 changes: 0 additions & 2 deletions pkg/api/query/v1.go
Expand Up @@ -374,7 +374,6 @@ func (qapi *QueryAPI) query(r *http.Request) (interface{}, []error, *api.ApiErro
if err != nil {
return nil, nil, &api.ApiError{Typ: api.ErrorBadData, Err: err}
}
defer qry.Close()

tracing.DoInSpan(ctx, "query_gate_ismyturn", func(ctx context.Context) {
err = qapi.gate.Start(ctx)
Expand Down Expand Up @@ -503,7 +502,6 @@ func (qapi *QueryAPI) queryRange(r *http.Request) (interface{}, []error, *api.Ap
if err != nil {
return nil, nil, &api.ApiError{Typ: api.ErrorBadData, Err: err}
}
defer qry.Close()

tracing.DoInSpan(ctx, "query_gate_ismyturn", func(ctx context.Context) {
err = qapi.gate.Start(ctx)
Expand Down

0 comments on commit 31cd60a

Please sign in to comment.