From eb8e95516f525c6c6748b43ab68b6a9285d237be Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 1 Mar 2024 21:33:05 +0200 Subject: [PATCH] lib/streamaggr: allow one second aggregation interval --- lib/streamaggr/streamaggr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/streamaggr/streamaggr.go b/lib/streamaggr/streamaggr.go index 0891551b2..4c27b6d69 100644 --- a/lib/streamaggr/streamaggr.go +++ b/lib/streamaggr/streamaggr.go @@ -272,8 +272,8 @@ func newAggregator(cfg *Config, pushFunc PushFunc, dedupInterval time.Duration) if err != nil { return nil, fmt.Errorf("cannot parse `interval: %q`: %w", cfg.Interval, err) } - if interval <= time.Second { - return nil, fmt.Errorf("aggregation interval should be higher than 1s; got %s", interval) + if interval < time.Second { + return nil, fmt.Errorf("aggregation interval cannot be smaller than 1s; got %s", interval) } // check cfg.StalenessInterval