Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
benclive committed Sep 26, 2024
1 parent c7409ae commit c7cb475
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/ingester/recalculate_owned_streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,15 @@ func (s *ownedStreamsIngesterStrategy) checkRingForChanges() (bool, error) {
return ringChanged, nil
}

//nolint:staticcheck
func (s *ownedStreamsIngesterStrategy) isOwnedStream(str *stream) (bool, error) {
descsBuf := s.descsBufPool.Get().([]ring.InstanceDesc)
hostsBuf := s.hostsBufPool.Get().([]string)
zoneBuf := s.zoneBufPool.Get().([]string)
defer func() {
s.descsBufPool.Put(&descsBuf)
s.hostsBufPool.Put(&hostsBuf)
s.zoneBufPool.Put(&zoneBuf)
s.descsBufPool.Put(descsBuf[:0])
s.hostsBufPool.Put(hostsBuf[:0])
s.zoneBufPool.Put(zoneBuf[:0])
}()

replicationSet, err := s.ingestersRing.Get(lokiring.TokenFor(str.tenant, str.labelsString), ring.WriteNoExtend, descsBuf, hostsBuf, zoneBuf)
Expand Down

0 comments on commit c7cb475

Please sign in to comment.