Skip to content

Commit

Permalink
Rename iteratorResult fields
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Disibio <mdisibio@gmail.com>
  • Loading branch information
mdisibio committed Jun 14, 2021
1 parent 1371f0f commit 1b1b033
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tempodb/encoding/iterator_multiblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ type multiblockIterator struct {
err atomic.Error
}

var _ Iterator = (*multiblockIterator)(nil)

type iteratorResult struct {
ID common.ID
Body []byte
id common.ID
object []byte
}

// NewMultiblockIterator Creates a new multiblock iterator. Iterates concurrently in a separate goroutine and results are buffered.
Expand Down Expand Up @@ -74,7 +76,7 @@ func (i *multiblockIterator) Next(ctx context.Context) (common.ID, []byte, error
return nil, nil, io.EOF
}

return res.ID, res.Body, nil
return res.id, res.object, nil
}
}

Expand Down Expand Up @@ -124,8 +126,8 @@ func (i *multiblockIterator) iterate(ctx context.Context) {

// Copy slices allows data to escape the iterators
res := iteratorResult{
ID: append([]byte(nil), lowestID...),
Body: append([]byte(nil), lowestObject...),
id: append([]byte(nil), lowestID...),
object: append([]byte(nil), lowestObject...),
}

lowestBookmark.clear()
Expand Down

0 comments on commit 1b1b033

Please sign in to comment.