From fad008df7e4b4778419973e57f61a46e6bab6678 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 8 Jul 2020 13:53:29 +0300 Subject: [PATCH] lib/storage: clarify `out of retention period` error message by mentioning `-retentionPeriod` command-line flag --- lib/storage/storage.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 3670b7ec9b..74f23c318b 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -1153,7 +1153,8 @@ func (s *Storage) add(rows []rawRow, mrs []MetricRow, precisionBits uint8) ([]ra if mr.Timestamp < minTimestamp { // Skip rows with too small timestamps outside the retention. if firstWarn == nil { - firstWarn = fmt.Errorf("cannot insert row with too small timestamp %d outside the retention; minimum allowed timestamp is %d", + firstWarn = fmt.Errorf("cannot insert row with too small timestamp %d outside the retention; minimum allowed timestamp is %d; "+ + "probably you need updating -retentionPeriod command-line flag", mr.Timestamp, minTimestamp) } atomic.AddUint64(&s.tooSmallTimestampRows, 1) @@ -1162,7 +1163,8 @@ func (s *Storage) add(rows []rawRow, mrs []MetricRow, precisionBits uint8) ([]ra if mr.Timestamp > maxTimestamp { // Skip rows with too big timestamps significantly exceeding the current time. if firstWarn == nil { - firstWarn = fmt.Errorf("cannot insert row with too big timestamp %d exceeding the current time; maximum allowd timestamp is %d", + firstWarn = fmt.Errorf("cannot insert row with too big timestamp %d exceeding the current time; maximum allowd timestamp is %d; "+ + "propbably you need updating -retentionPeriod command-line flag", mr.Timestamp, maxTimestamp) } atomic.AddUint64(&s.tooBigTimestampRows, 1)