Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to reset storage caches at next restart #1447

Closed
f41gh7 opened this issue Jul 13, 2021 · 2 comments
Closed

Allow to reset storage caches at next restart #1447

f41gh7 opened this issue Jul 13, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@f41gh7
Copy link
Contributor

f41gh7 commented Jul 13, 2021

Is your feature request related to a problem? Please describe.

Now its hard to reset internal storage caches at kubernetes based deployments. storage pods configured with the same parameters and managed by replicaset-controller. So its not possible to stop one pod, cleanup cache and start it again.

Describe the solution you'd like
Storage cache can be reset on the next service start with special flag file reset_cache_on_startup, that must be placed at cache/ directory. After cache reset, storage service must remove this flag from directory.

vmsingle usage:

kubectl exec -it vmsingle-pod sh
touch victoria-metrics-data/cache/reset_cache_on_startup
kubectl delete pod vmsingle-pod

vmstorage usage:

kubectl exec -it vmstorage-pod-0
touch vmstorage-data/cache/reset_cache_on_startup
kubectl delete pod vmstorage-pod-0

Describe alternatives you've considered
remove cache from disk and perform kill -9, it may lead to dataloss for storage.

@f41gh7 f41gh7 added the enhancement New feature or request label Jul 13, 2021
@valyala
Copy link
Collaborator

valyala commented Jul 13, 2021

VictoriaMetrics should automatically remove the <-storageDataPath>/cache directory on startup if the directory contains reset_cache_on_startup file starting from the commit 682662b .

@valyala
Copy link
Collaborator

valyala commented Jul 15, 2021

VictoriaMetrics should automatically remove the <-storageDataPath>/cache directory on startup if the directory contains reset_cache_on_startup file starting from v1.63.0. Closing the feature request as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants