From 6f8aa180844c855698d002985a24fa9302fd2a47 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Mon, 9 Dec 2024 09:27:39 +0100 Subject: [PATCH] sidecar: fix limit mintime 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 114eef55d7..e1c6a0a2e6 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