VictoriaMetrics/app
Nikolay 544fba6826
lib/storage: pre-create timeseries before indexDB rotation (#4652)
* lib/storage: pre-create timeseries before indexDB rotation
during an hour before indexDB rotation start creating records at the next indexDB
it must improve performance during switch for the next indexDB and remove ingestion issues.
Since there is no need for creation new index records for timeseries already ingested into current indexDB
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4563

* lib/storage: further work on indexdb rotation optimization

- Document the change at docs/CHAGNELOG.md
- Move back various caches from indexDB to Storage. This makes the change less intrusive.
  The dateMetricIDCache now takes into account indexDB generation, so it stores (date, metricID)
  entries for both the current and the next indexDB.
- Consolidate the code responsible for idbNext pre-filling into prefillNextIndexDB() function.
  This improves code readability and maintainability a bit.
- Rewrite and simplify the code responsible for calculating the next retention timestamp.
  Add various tests for corner cases of this code.
- Remove indexdb pre-filling from RegisterMetricNames() function, since this function is rarely called.
  It is OK to add indexdb entries on demand in this function. This simplifies the code.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1401

* docs/CHANGELOG.md: refer to https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4563

---------

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-07-22 15:20:21 -07:00
..
victoria-logs app/vlselect: handle vmui at /select/vmui path instead of /vmui 2023-06-21 19:52:50 -07:00
victoria-metrics docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
vlinsert app/vlinsert/loki: fix build for architectures where int is 32-bit 2023-07-20 21:00:58 -07:00
vlselect app/{vmselect,vlselect}: run make vmui-update vmui-logs-update after recent changes to VMUI 2023-07-20 17:26:03 -07:00
vlstorage docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
vmagent lib/promscrape: follow-up after 6aa50ca954 2023-07-20 19:14:33 -07:00
vmalert app/vmalert/datasource/graphite: allow overriding "from" parameter for datasource queries (#4687) 2023-07-21 14:28:10 +04:00
vmauth docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
vmbackup docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
vmbackupmanager docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
vmctl docs: mention the simplest way to migrate data in vmctl docs 2023-07-20 14:39:30 +02:00
vmgateway docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
vminsert vmalert: init unit test (#4596) 2023-07-20 15:07:10 +02:00
vmrestore docs: follow-up after aec4b5db81 (#4638) 2023-07-19 10:10:51 +02:00
vmselect app/vmselect/promql: fix tests after 781947a7e2 2023-07-20 21:25:38 -07:00
vmstorage lib/storage: pre-create timeseries before indexDB rotation (#4652) 2023-07-22 15:20:21 -07:00
vmui fix: change getting serverUrl for vmui-logs (#4604) (#4677) 2023-07-20 17:21:16 -07:00