profile
viewpoint

Ask questionsseries count API returns old value after calling delete series API

Describe the bug I got old return value from /api/v1/series/count after calling /api/v1/admin/tsdb/delete_series.

To Reproduce

After ingesting multiple time series,

$ curl http://localhost:8428/api/v1/series/count
{"status":"success","data":[150]}

then, delete series from VM.

$ curl -G 'http://localhost:8428/api/v1/admin/tsdb/delete_series' --data-urlencode 'match[]={__name__=~".*"}'

Now, series API returns empty result.

$ curl -G 'http://localhost:8428/api/v1/series' --data-urlencode 'match[]={__name__=~".*"}' --data 'start=0'
{"status":"success","data":[]}

But count API still returns old stats.

$ curl http://localhost:8428/api/v1/series/count
{"status":"success","data":[150]}

Expected behavior

I want to get a correct value from series count API after series deletion.

Version

  • v1.41.0

Used command-line flags

  • nothing
VictoriaMetrics/VictoriaMetrics

Answer questions ledmonster

@dxtrzhang thanks, now I tried that API, but count API still returns old value.

$ curl http://localhost:8428/internal/resetRollupResultCache
$ curl -G 'http://localhost:8428/api/v1/series' --data-urlencode 'match[]={__name__=~".*"}' --data 'start=0'
{"status":"success","data":[]}
$ curl http://localhost:8428/api/v1/labels/count
{"status":"success","data":{}}
$ curl http://localhost:8428/api/v1/series/count
{"status":"success","data":[780]}
useful!

Related questions

Failure to deploy with `helm template` in ArgoCD hot 2
Remote write for Prometheus not working hot 1
Graph missing some points hot 1
How to write data to VictoriaMetrics individually in batches? hot 1
Add data deduplication from HA Prometheus pair based on `--query.replica-label` arg similar to Thanos Query hot 1
Can't start VictoriaMetrics use docker-compose and volume mapping on Windows hot 1
Downsampling data - VictoriaMetrics hot 1
While under heavy load getting error panic hot 1
While under heavy load getting error panic hot 1
While under heavy load getting error panic hot 1
Windows build hot 1
Increase default value for -search.maxPointsPerTimeseries hot 1
changing precisionBits doesn't result in change in precision of stored value hot 1
Drop-in replacement prometheus not work with promxy (Prometheus HA) hot 1
source:https://uonfu.com/
Github User Rank List