From 03cf1b0ab7fd6043d426e60944c10f1f569315b8 Mon Sep 17 00:00:00 2001 From: mzardab Date: Tue, 18 Jan 2022 10:00:07 +0000 Subject: [PATCH] Addressing PR comments Signed-off-by: mzardab --- cmd/thanos/compact.go | 8 ++------ test/e2e/e2ethanos/services.go | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/thanos/compact.go b/cmd/thanos/compact.go index 4f2f73286d4..bad0c7f4a2a 100644 --- a/cmd/thanos/compact.go +++ b/cmd/thanos/compact.go @@ -390,22 +390,18 @@ func runCompact( if retentionByResolution[compact.ResolutionLevelRaw].Seconds() != 0 { // If downsampling is enabled, error if raw retention is not sufficient for downsampling to occur (upper bound 10 days for 1h resolution) if !conf.disableDownsampling && retentionByResolution[compact.ResolutionLevelRaw].Seconds() < downsample.ResLevel1DownsampleRange { - return errors.New("raw resolution must be higher than the minimum block size after which 1h resolution downsampling will occur (40 hours)") + return errors.New("raw resolution must be higher than the minimum block size after which 5m resolution downsampling will occur (40 hours)") } level.Info(logger).Log("msg", "retention policy of raw samples is enabled", "duration", retentionByResolution[compact.ResolutionLevelRaw]) } if retentionByResolution[compact.ResolutionLevel5m].Seconds() != 0 { // If retention is lower than minimum downsample range, then no downsampling at this resolution will be persisted if !conf.disableDownsampling && retentionByResolution[compact.ResolutionLevel5m].Seconds() < downsample.ResLevel2DownsampleRange { - return errors.New("5m resolution retention must be higher than the minimum block size after which 5m resolution downsampling will occur (10 days)") + return errors.New("5m resolution retention must be higher than the minimum block size after which 1h resolution downsampling will occur (10 days)") } level.Info(logger).Log("msg", "retention policy of 5 min aggregated samples is enabled", "duration", retentionByResolution[compact.ResolutionLevel5m]) } if retentionByResolution[compact.ResolutionLevel1h].Seconds() != 0 { - // If retention is lower than minimum downsample range, then no downsampling at this resolution will be persisted - if !conf.disableDownsampling && retentionByResolution[compact.ResolutionLevel1h].Seconds() < downsample.ResLevel2DownsampleRange { - return errors.New("1h resolution retention must be higher than the minimum block size after which 1h resolution downsampling will occur (10 days)") - } level.Info(logger).Log("msg", "retention policy of 1 hour aggregated samples is enabled", "duration", retentionByResolution[compact.ResolutionLevel1h]) } diff --git a/test/e2e/e2ethanos/services.go b/test/e2e/e2ethanos/services.go index 5c3dcc7636a..db5c9549f72 100644 --- a/test/e2e/e2ethanos/services.go +++ b/test/e2e/e2ethanos/services.go @@ -743,6 +743,7 @@ func NewCompactor(e e2e.Environment, name string, bucketConfig client.BucketConf "--selector.relabel-config": string(relabelConfigBytes), "--wait": "", }), extArgs...)...), + Readiness: e2e.NewHTTPReadinessProbe("http", "/-/ready", 200, 200), User: strconv.Itoa(os.Getuid()), WaitReadyBackoff: &defaultBackoffConfig, },