Skip to content

Allow to reset storage caches at next restart #1447

@f41gh7

Description

@f41gh7

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions