usage_schema ❯ select * from vnode_disk_storage order by time desc limit 20;
+-------------------------------+--------------+---------------------+--------+----------+-----------+
| time | database | node_id | tenant | vnode_id | value |
+-------------------------------+--------------+---------------------+--------+----------+-----------+
| 2024-01-22T23:58:24.436714306 | usage_schema | 1703756289290769956 | cnosdb | 3 | 105401570 |
| 2024-01-22T23:58:14.437178209 | usage_schema | 1703756289290769956 | cnosdb | 3 | 105401570 |
| 2024-01-22T23:58:04.436457352 | usage_schema | 1703756289290769956 | cnosdb | 3 | 105401570 |
Through the vnode_disk_storage table in usage_scehma, you can see the storage size of the current vnode. I want to know, if a vnode expires, how will its usage be reflected in this table? According to my experience using http_data_in, the value in the table is a monotonically increasing value. So how does the reduced usage of expiration deletion be reflected in the vnode table?
When a vnode expires, it is deleted and displayed as 0 in vnode_disk_storage, after which the records for that vnode are not updated.I know this because I saw a change on the official website to address this issue: https://github.com/cnosdb/cnosdb/commit/058ba9d92dd26f5c805e478d07fa5581540a908d
This change shows that when a vnode does not exist, the metric record for that vnode will also be deleted