Skip to content

Commit 7a38743

Browse files
authored
costattribution.ActiveSeriesTracker: remove duplicate code (#12821)
#### What this PR does This piece of code duplicates the previous lines, and is never executed because the previous branches have their return statement. No changelog or anything needed, this is a noop. Signed-off-by: Oleg Zaytsev <[email protected]>
1 parent 83c03ab commit 7a38743

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

pkg/costattribution/active_tracker.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -110,27 +110,6 @@ func (at *ActiveSeriesTracker) Increment(lbls labels.Labels, now time.Time, nati
110110
return
111111
}
112112

113-
if !at.overflowSince.IsZero() {
114-
at.observedMtx.RUnlock()
115-
at.overflowCounter.activeSeries.Inc()
116-
if nativeHistogramBucketNum >= 0 {
117-
at.overflowCounter.nativeHistograms.Inc()
118-
at.overflowCounter.nativeHistogramBuckets.Add(int64(nativeHistogramBucketNum))
119-
}
120-
return
121-
}
122-
123-
c, ok = at.observed[string(buf.Bytes())]
124-
if ok {
125-
c.activeSeries.Inc()
126-
if nativeHistogramBucketNum >= 0 {
127-
c.nativeHistograms.Inc()
128-
c.nativeHistogramBuckets.Add(int64(nativeHistogramBucketNum))
129-
}
130-
at.observedMtx.RUnlock()
131-
return
132-
}
133-
134113
if !at.overflowSince.IsZero() {
135114
at.observedMtx.RUnlock()
136115
at.overflowCounter.activeSeries.Inc()

0 commit comments

Comments
 (0)