mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
548bf31dd2
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
|
||
---|---|---|
.. | ||
fscore | ||
dir_remover.go | ||
fadvise_darwin.go | ||
fadvise_openbsd.go | ||
fadvise_solaris.go | ||
fadvise_unix.go | ||
fs.go | ||
fs_nix.go | ||
fs_openbsd.go | ||
fs_solaris.go | ||
fs_test.go | ||
fs_unix.go | ||
fs_windows.go | ||
reader_at.go | ||
reader_at_test.go | ||
reader_at_timing_test.go |