influxdata / influxdata/influxdb
some metrics error when a full restore processing done
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. do a full restore
2. fetch the metrics via /metrics api. then you can find `influxdb_buckets_total,influxdb_tokens_total ....other xxx_total metrics` values are all 0.
3. if restart the influxdb instance then can get the correct metrics
__Expected behavior:__
Describe what you expected to happen.
the /metrics API can get metrics correctly when a full restore done.
__Actual behavior:__
Describe What actually happened.
when a full restore done, some metrics `influxdb_buckets_total,influxdb_tokens_total` values are not correct, if i want to get correct metrics i have to restart the influxdb instance.
__Environment info:__
* System info: Run `uname -srm` and copy the output here
* InfluxDB version: Run `influxd version` and copy the output here
* Other relevant environment details: Container runtime, disk info, etc
__Config:__
Copy any non-default config values here or attach the full config as a gist or file.
__Logs:__
Include snippet of errors in log.
__Performance:__
Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.
```sh
# Commands should be run when the bug is actively happening.
# Note: This command will run for ~30 seconds.
curl -o profiles.tar.gz "http://localhost:8086/debug/pprof/all?cpu=30s"
iostat -xd 1 30 > iostat.txt
# Attach the `profiles.tar.gz` and `iostat.txt` output files.
```
Contributor guide
Research direction
Start by performing a full restore and querying the /metrics API, checking whether influxdb_buckets_total and influxdb_tokens_total remain zero. Trace the restore-to-metrics path to identify why values are not refreshed; done means the metrics report correct values immediately after restore without restarting influxd.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, databases, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100