Fix fastpath check for ooo native histogram enabled

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
György Krajcsovits 2024-08-02 10:51:00 +02:00
parent d2f78fb3d5
commit 48d3a5cbfc

View file

@ -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
}