Skip to content

Commit

Permalink
Naming
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Rabenhorst <[email protected]>
  • Loading branch information
rabenhorst committed May 24, 2024
1 parent 74aa743 commit c938054
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tsdb/agent/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ func (a *appender) Append(ref storage.SeriesRef, l labels.Labels, t int64, v flo
series.Lock()
defer series.Unlock()

if t <= a.minTs(series.lastTs) {
if t <= a.minValidTime(series.lastTs) {
a.metrics.totalOutOfOrderSamples.Inc()
return 0, storage.ErrOutOfOrderSample
}
Expand Down Expand Up @@ -944,7 +944,7 @@ func (a *appender) AppendHistogram(ref storage.SeriesRef, l labels.Labels, t int
series.Lock()
defer series.Unlock()

if t <= a.minTs(series.lastTs) {
if t <= a.minValidTime(series.lastTs) {
a.metrics.totalOutOfOrderSamples.Inc()
return 0, storage.ErrOutOfOrderSample
}
Expand Down Expand Up @@ -1120,7 +1120,7 @@ func (a *appender) logSeries() error {

// mintTs returns the minimum timestamp that a sample can have
// and is needed for preventing underflow.
func (a *appender) minTs(lastTs int64) int64 {
func (a *appender) minValidTime(lastTs int64) int64 {
if lastTs < math.MinInt64+a.opts.OutOfOrderTimeWindow {
return math.MinInt64
}
Expand Down

0 comments on commit c938054

Please sign in to comment.