The store used_size of compute node is not correct after restarting with smaller capacity #8920
Labels
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
component/storage
severity/minor
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Reason:
FileCache::restoreDMFile
will callFileCache::removeDiskFile
to remove the files that larger than capacity. However, it will also callcapacity_metrics->freeUsedSize
to subtract theused_size
, which make theused_size
become a negative number.tiflash/dbms/src/Storages/S3/FileCache.cpp
Lines 645 to 676 in 6bd9e6b
Note that it does not affect any functionality, but only the
used_size
shown in Grafana is negative. And restarting the compute node again can workaround the issue.2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
master, 7.5
The text was updated successfully, but these errors were encountered: