From a130a13cef9e56bae78f87c3e356bb1337e9360f Mon Sep 17 00:00:00 2001 From: Bartlomiej Plotka Date: Mon, 2 Sep 2024 21:13:33 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20Properly=20put=20OM=20text=20p?= =?UTF-8?q?.CreatedTimestamp=20behind=20feature=20flag=20(#14=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c5e015d29534f06bd1d238c64a06b7ac41abdd7f. --- scrape/scrape.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scrape/scrape.go b/scrape/scrape.go index 4d018df70..ccb068b68 100644 --- a/scrape/scrape.go +++ b/scrape/scrape.go @@ -1634,14 +1634,12 @@ loop: if seriesAlreadyScraped && parsedTimestamp == nil { err = storage.ErrDuplicateSampleForTimestamp } else { - if sl.enableCTZeroIngestion { - if ctMs := p.CreatedTimestamp(); ctMs != nil { - ref, err = app.AppendCTZeroSample(ref, lset, t, *ctMs) - if err != nil && !errors.Is(err, storage.ErrOutOfOrderCT) { // OOO is a common case, ignoring completely for now. - // CT is an experimental feature. For now, we don't need to fail the - // scrape on errors updating the created timestamp, log debug. - level.Debug(sl.l).Log("msg", "Error when appending CT in scrape loop", "series", string(met), "ct", *ctMs, "t", t, "err", err) - } + if ctMs := p.CreatedTimestamp(); sl.enableCTZeroIngestion && ctMs != nil { + ref, err = app.AppendCTZeroSample(ref, lset, t, *ctMs) + if err != nil && !errors.Is(err, storage.ErrOutOfOrderCT) { // OOO is a common case, ignoring completely for now. + // CT is an experimental feature. For now, we don't need to fail the + // scrape on errors updating the created timestamp, log debug. + level.Debug(sl.l).Log("msg", "Error when appending CT in scrape loop", "series", string(met), "ct", *ctMs, "t", t, "err", err) } }