From b3645c80170e5e445191d80631b278fefd9abd6f Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 10 Dec 2024 11:22:07 +0100 Subject: [PATCH] sidecar: fix limit mintime (#7970) Signed-off-by: Michael Hoffmann --- CHANGELOG.md | 2 ++ cmd/thanos/sidecar.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf3378b5a..e883362e15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re ### Fixed +- [#7970](https://github.com/thanos-io/thanos/pull/7970) Sidecar: Respect min-time setting. + ### Added - [#7907](https://github.com/thanos-io/thanos/pull/7907) Receive: Add `--receive.grpc-service-config` flag to configure gRPC service config for the receivers. diff --git a/cmd/thanos/sidecar.go b/cmd/thanos/sidecar.go index 127584ea94..531ffb8ab4 100644 --- a/cmd/thanos/sidecar.go +++ b/cmd/thanos/sidecar.go @@ -505,7 +505,7 @@ func (s *promMetadata) UpdateTimestamps(ctx context.Context) error { return err } - s.mint = min(s.limitMinTime.PrometheusTimestamp(), mint) + s.mint = max(s.limitMinTime.PrometheusTimestamp(), mint) s.maxt = math.MaxInt64 return nil