Questions About TiKV Space Usage

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

Original topic: 关于 TIKV 空间使用的疑问

| username: TiDBer_JUi6UvZm

The logs in the LOCK CF of TiKV are all appended and not deleted. In the long run, won’t this waste space?

| username: WalterWj | Original post link

There is gc + compact recycling.

| username: zhanggame1 | Original post link

Isn’t the TiKV space mostly occupied by the default CF and write CF? The lock CF is very, very small.

| username: DBAER | Original post link

That’s right, and GC will free up space.

| username: Kamner | Original post link

lock column family: Used to store pessimistic locks for pessimistic transactions and the first phase Prewrite locks for distributed transactions. After a user’s transaction is committed, the corresponding data in the lock column family is quickly deleted, so in most cases, the data in the lock column family is minimal (less than 1GB). If the data in the lock column family increases significantly, it indicates that a large number of transactions are waiting to be committed, and the system has encountered a bug or failure.

| username: TiDBer_QYr0vohO | Original post link

There is GC for reclamation.

| username: TiDBer_jYQINSnf | Original post link

The data in the lock cf is very small and disappears after the transaction is committed.
What you are referring to as continuously appending is the raftcf, right? This will generate raft log compaction.

| username: TiDBer_JUi6UvZm | Original post link

Is there any way to prove that the space has been reclaimed?

| username: jiayou64 | Original post link

GC recycling

| username: dba远航 | Original post link

Using GC for reclamation, if not reclaimed, space will definitely become an issue.

| username: xiaoqiao | Original post link

Post-recovery stage

| username: QH琉璃 | Original post link

Isn’t GC supposed to reclaim it?

| username: system | Original post link

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