Skip to content

Commit

Permalink
Preallocate for review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zalegrala committed Oct 25, 2023
1 parent e51b23d commit 4512d1d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tempodb/backend/azure/v1/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ func (rw *V1) ListBlocks(ctx context.Context, keypath backend.KeyPath) ([]uuid.U
span, ctx := opentracing.StartSpanFromContext(ctx, "V1.ListBlocks")
defer span.Finish()

var blockIDs []uuid.UUID
var compactedBlockIDs []uuid.UUID
blockIDs := make([]uuid.UUID, 1000)
compactedBlockIDs := make([]uuid.UUID, 1000)

keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)

Expand Down
4 changes: 2 additions & 2 deletions tempodb/backend/azure/v2/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ func (rw *V2) ListBlocks(ctx context.Context, keypath backend.KeyPath) ([]uuid.U
span, ctx := opentracing.StartSpanFromContext(ctx, "V2.ListBlocks")
defer span.Finish()

var blockIDs []uuid.UUID
var compactedBlockIDs []uuid.UUID
blockIDs := make([]uuid.UUID, 1000)
compactedBlockIDs := make([]uuid.UUID, 1000)

keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)

Expand Down
4 changes: 2 additions & 2 deletions tempodb/backend/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ func (rw *readerWriter) ListBlocks(ctx context.Context, keypath backend.KeyPath)
span, ctx := opentracing.StartSpanFromContext(ctx, "readerWriter.ListBlocks")
defer span.Finish()

var blockIDs []uuid.UUID
var compactedBlockIDs []uuid.UUID
blockIDs := make([]uuid.UUID, 1000)
compactedBlockIDs := make([]uuid.UUID, 1000)

keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)
prefix := path.Join(keypath...)
Expand Down
4 changes: 2 additions & 2 deletions tempodb/backend/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ func (rw *readerWriter) ListBlocks(
span, ctx := opentracing.StartSpanFromContext(ctx, "readerWriter.ListBlocks")
defer span.Finish()

var blockIDs []uuid.UUID
var compactedBlockIDs []uuid.UUID
blockIDs := make([]uuid.UUID, 1000)
compactedBlockIDs := make([]uuid.UUID, 1000)

keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)
prefix := path.Join(keypath...)
Expand Down

0 comments on commit 4512d1d

Please sign in to comment.