Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiKV 是否支持创建 ColumnFamily
To improve efficiency, please provide the following information. A clear problem description can lead to a quicker resolution:
【Overview】 Does TiKV support creating ColumnFamily?
【Application Framework and Business Logic Adaptation】
【Background】 What operations have been performed?
【Phenomenon】 Business and database phenomena
【Problem】 The current issue encountered
【Business Impact】
【TiDB Version】
【Attachments】 Relevant logs and monitoring (https://metricstool.pingcap.com/)
For questions related to performance optimization and troubleshooting, please download and run the script. Be sure to select all and copy-paste the terminal output results for upload.
Data written to RocksDB is first written to the MemTable. When the size of a MemTable exceeds 128MB, it switches to a new MemTable for writing. There are a total of 2 RocksDB instances in TiKV, with a combined total of 4 ColumnFamilies. The size limit for a single MemTable in each ColumnFamily is 128MB, and a maximum of 5 MemTables are allowed to exist; otherwise, it will block foreground writes. Therefore, the maximum memory usage for this part is 4 x 5 x 128MB = 2.5GB. This memory usage is relatively small, and it is not recommended for users to change it themselves.
I understand that RocksDB is just a component of TiDB, and ColumnFamily has already been defined as those like lock, default, write, etc. However, if we are talking about RocksDB alone, you can call CreateColumnFamily to manually create CF in RocksDB.
This brother means that TiKV alone supports creating CF because TiKV is a distributed KV, while RocksDB and LevelDB are single-node KVs. For users, they are all KVs, so this brother wants to know if TiKV, as a KV, can create CF.
The answer is: No, you can understand that TiKV globally has only one CF.
The knowledge currently being studied is not sufficient; TiDB itself is a large ColumnFamily.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.