mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: clarify out of retention period
error message by mentioning -retentionPeriod
command-line flag
This commit is contained in:
parent
fe58462bef
commit
fad008df7e
1 changed files with 4 additions and 2 deletions
|
@ -1153,7 +1153,8 @@ func (s *Storage) add(rows []rawRow, mrs []MetricRow, precisionBits uint8) ([]ra
|
||||||
if mr.Timestamp < minTimestamp {
|
if mr.Timestamp < minTimestamp {
|
||||||
// Skip rows with too small timestamps outside the retention.
|
// Skip rows with too small timestamps outside the retention.
|
||||||
if firstWarn == nil {
|
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)
|
mr.Timestamp, minTimestamp)
|
||||||
}
|
}
|
||||||
atomic.AddUint64(&s.tooSmallTimestampRows, 1)
|
atomic.AddUint64(&s.tooSmallTimestampRows, 1)
|
||||||
|
@ -1162,7 +1163,8 @@ func (s *Storage) add(rows []rawRow, mrs []MetricRow, precisionBits uint8) ([]ra
|
||||||
if mr.Timestamp > maxTimestamp {
|
if mr.Timestamp > maxTimestamp {
|
||||||
// Skip rows with too big timestamps significantly exceeding the current time.
|
// Skip rows with too big timestamps significantly exceeding the current time.
|
||||||
if firstWarn == nil {
|
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)
|
mr.Timestamp, maxTimestamp)
|
||||||
}
|
}
|
||||||
atomic.AddUint64(&s.tooBigTimestampRows, 1)
|
atomic.AddUint64(&s.tooBigTimestampRows, 1)
|
||||||
|
|
Loading…
Reference in a new issue