Victoriametrics: Error while inserting data more then 2 days in future.

Created on 12 Oct 2020  路  3Comments  路  Source: VictoriaMetrics/VictoriaMetrics

Describe the bug
Writing data with future day, produces:
2020-10-11T22:52:07.001Z error VictoriaMetrics/lib/storage/storage.go:1237 warn occurred during rows addition: cannot insert row with too big timestamp 1893452400000 exceeding the current time; maximum allowd timestamp is 1602629526000; propbably you need updating -retentionPeriod command-line flag

To Reproduce
Insert data with a future day (more then +2 days from current date)

Expected behavior
Write should be successfull

Screenshots

  • not needed

Version

$ ./victoria-metrics-prod --version
victoria-metrics-20201006-113018-tags-v1.43.0-0-g2a6fa5395

Used command-line flags
./victoria-metrics-prod -maxConcurrentInserts 1024 -memory.allowedPercent=40 -retentionPeriod=1200

Additional context
The line of code says it clearly:
https://github.com/VictoriaMetrics/VictoriaMetrics/blob/1f33dd717f2526462807f9337e76f54060b3031d/lib/storage/table.go#L380

This should be a bug, it is not uncommon to store data in the future, for example meteo weather forecast, those will be deleted and re-added after a new forecast is made, but that is normal.

enhancement

Most helpful comment

Please disable this limitation
I need to store future data for my forecasts too

All 3 comments

Please disable this limitation
I need to store future data for my forecasts too

Hi. Can you find time for this issue? It's very important for me too. We using your database because it very fast instead of Thanos and Prometheus.

VictoriaMetrics architecture has been designed with the assumption that timestamps for the ingested samples shouldn't go too far in the future. That's why there could be unexpected issues after removing this limitation. This needs additional investigation before allowing storing samples with timestamps from the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sh0rez picture sh0rez  路  3Comments

v98765 picture v98765  路  3Comments

localpref picture localpref  路  3Comments

oOHenry picture oOHenry  路  4Comments

genericgithubuser picture genericgithubuser  路  4Comments