VictoriaMetrics/app
Roman Khavronenko 548bf31dd2
app/vmselect: make vmselect resilient to absence of cache folder (#5987)
vmselect uses a cache folder in file system for two purposes:
1. Storing rollup cache results on shutdown;
2. Storing temporary search results from vmstorage during query executions.

It could happen that cache folder is deleted accidentally by user, or by OS
during cleanup routines. This would cause vmselect to:
1. panic on /metrics call, because `MustGetFreeSpace` will fail;
2. return query error user, as it won't be able to store temporary search results.

The changes in this commit are the following:
1. Make `MustGetFreeSpace` to try re-creating the cache folder if it is missing;
2. Make vmselect to try re-creating the cache folder if it can't persist tmp search
results.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5985

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Nikolay <nik@victoriametrics.com>
(cherry picked from commit cb23685681)
2024-03-26 15:27:32 +01:00
..
victoria-logs all: add support for specifying multiple -httpListenAddr options 2024-02-09 03:22:49 +02:00
vlinsert Add _stream fields log (#5068) 2023-11-17 16:04:13 +01:00
vlselect fix typo in kyiv city name 2024-03-25 15:42:53 +01:00
vlstorage app/vlselect: follow-up for 451d2abf50 2024-02-18 23:06:08 +02:00
vmagent [vmagent] added ingestion rate limiting with new flag -maxIngestionRate (#5900) 2024-03-25 15:42:52 +01:00
vmalert feat: include cluster info in alert CPUThrottlingHigh (#5956) 2024-03-17 20:46:15 +02:00
vmalert-tool docs: convert png images to webp in all the docs except of docs/operator/* 2023-11-22 19:29:47 +02:00
vmauth app/vmauth: properly initialize URLPrefix in tests 2024-03-08 21:15:24 +01:00
vmbackup lib/snapshot: move Time, Validate and NewName into lib/snapshot/snapshotutil package 2024-02-09 04:19:30 +02:00
vmbackupmanager docs: convert png images to webp in all the docs except of docs/operator/* 2023-11-22 19:29:47 +02:00
vmctl app/vmctl: break explore phase in vm-native mode by time intervals 2024-03-25 15:42:24 +01:00
vmgateway docs: convert png images to webp in all the docs except of docs/operator/* 2023-11-22 19:29:47 +02:00
vminsert app/{vmagent,vminsert}: follow-up for 434a5803e7 2024-02-29 18:05:12 +02:00
vmrestore all: add support for specifying multiple -httpListenAddr options 2024-02-09 03:22:49 +02:00
vmselect app/vmselect: make vmselect resilient to absence of cache folder (#5987) 2024-03-26 15:27:32 +01:00
vmstorage app: consistently use atomic.* types instead of atomic.* functions 2024-02-24 03:06:14 +02:00
vmui fix typo in kyiv city name 2024-03-25 15:42:53 +01:00