Open
Description
Steps to reproduce:
- Fetch metrics lines for
storage_shard_disk_size
fromhttp://<influxhost>:8086/metrics
as a reference. - Reduce retention setting of a larger bucket so that old data shards get deleted. Wait until the next retention check and deletion really happened.
- Fetch the metrics lines again. They will still contain the already deleted shards with their old disk size.
- Verify that the shards really have been deleted by looking into the file system data. The shard folders will be deleted as expected and their disk space freed.
- A full restart of InfluxDB2 will update the metrics to the expected real status.
Same behavior shows up for storage_tsm_files_disk_bytes
metrics.
See the following example of metrics and file system after a retention based deletion of several shards:
influx-metrics-and-fs-example.txt
Expected behavior:
Metrics lines for already deleted shards must be removed or their disk space gauge set to 0 to correctly indicate the currently used disk space.
Actual behavior:
Metrics lines for already deleted shards persist with the disk space indication from before deletion.
Environment info:
bash-5.1# uname -srm
Linux 5.4.0-91-generic x86_64
bash-5.1# influxd version
InfluxDB v2.6.1 (git: 9dcf880fe0) build_date: 2022-12-29T15:53:07Z
Using docker image influxdb:2.6.1-alpine
.
Config:
Config using default values except bolt and engine path.
influx-config.txt
Logs:
Performance:
n/a