From 630d9ce300a0082a26435ac9d82b7932d3168dcc Mon Sep 17 00:00:00 2001 From: Sandeep Sukhani Date: Tue, 19 Apr 2022 18:40:07 +0530 Subject: [PATCH] fix index gateway chunk refs response (#5957) --- pkg/storage/stores/shipper/indexgateway/gateway.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/storage/stores/shipper/indexgateway/gateway.go b/pkg/storage/stores/shipper/indexgateway/gateway.go index ba2e97d3f9eb3..b2c785fb79bdc 100644 --- a/pkg/storage/stores/shipper/indexgateway/gateway.go +++ b/pkg/storage/stores/shipper/indexgateway/gateway.go @@ -307,8 +307,8 @@ func (g *Gateway) GetChunkRef(ctx context.Context, req *indexgatewaypb.GetChunkR Refs: make([]*logproto.ChunkRef, 0, len(chunks)), } for _, cs := range chunks { - for _, c := range cs { - result.Refs = append(result.Refs, &c.ChunkRef) + for i := range cs { + result.Refs = append(result.Refs, &cs[i].ChunkRef) } } return result, nil