From 48d3a5cbfcdde7c4f459d168ef14a0d4e492ec3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Fri, 2 Aug 2024 10:51:00 +0200 Subject: [PATCH] Fix fastpath check for ooo native histogram enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: György Krajcsovits --- tsdb/head_append.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdb/head_append.go b/tsdb/head_append.go index 9a865da812..0b8388d671 100644 --- a/tsdb/head_append.go +++ b/tsdb/head_append.go @@ -628,7 +628,7 @@ func (a *headAppender) AppendHistogram(ref storage.SeriesRef, lset labels.Labels return 0, storage.ErrOutOfBounds } // Also fail fast if OOO is enabled, but OOO native histogram ingestion is disabled. - if a.oooTimeWindow > 0 && t < a.minValidTime && !a.head.opts.EnableOOONativeHistograms.Load() { + if a.oooTimeWindow > 0 && t < a.minValidTime && t >= a.headMaxt-a.oooTimeWindow && !a.head.opts.EnableOOONativeHistograms.Load() { return 0, storage.ErrOOONativeHistogramsDisabled }