How to Access Metadata in RocksDB

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 如何访问到rockdb的元数据

| username: HTAP萌新

【TiDB Usage Environment】Testing
【TiDB Version】5.3
【Encountered Problem】I am conducting some research on the storage of RocksDB under TiKV and want to obtain some metadata related to the LSM tree, such as the index and level information of SSTables. Currently, only some general information can be seen on Grafana (such as the number of SST files at each level). Is it possible to get more specific information? For example, the key range of all SST files, the level of the SST files, etc. (RocksDB should be using this information).
【Reproduction Path】Operations performed that led to the issue
【Problem Phenomenon and Impact】


Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: 特雷西-迈克-格雷迪 | Original post link

You need to search if there is an interface for RocksDB available for querying.

| username: xfworld | Original post link

Currently, you can only observe through the monitoring metrics exposed by Prometheus.

If you want to obtain more information, you need to refer to the source code and API of TiKV, as well as the source code and API of RocksDB.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.