Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 为什么tikv-write所有的数据都存储在在level5和6
[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] 5.7
[Encountered Problem] All data monitored by Grafana in the cluster is stored in levels 5 and 6. The data was batch loaded using Lightning (no update or insert operations). Is this phenomenon normal? Or is it caused by some configuration of TiKV? How can I ensure that levels 1-4 also contain data?
[Attachment]
Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.
After the data is compacted, it goes down. If you perform 1-4 updates, there will be data.
Each layer of data has a size limit, with the default lower layer being 10 times the size of the upper layer. When the limit is reached, it will compact and merge downwards. You can search for articles on “RocksDB compact” for more details.
Normally, old data will be moved to the lower levels. If you check the monitoring during the import, both level 0 and level 1 will have data.
Will the original files be deleted immediately after compaction?
Thank you, may I ask if the original files will be immediately deleted after compaction?
When using Lightning’s local backend to import data, it will compact the data and merge multiple small SST files into one large SST file.
If there are queries referencing it, delete it only after the queries are completed.
The image is not visible. Please provide the text you need translated.
Does “default up to 6 levels” limit the data size?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.