Is GC Persistent?

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

Original topic: GC是否持久化

| username: 胡杨树旁

Regarding the GC issue: The GC in TiDB has a GC leader that controls it and periodically deletes keys in TiKV. If the GC leader is re-elected at this time, will the ongoing GC be interrupted? Or is it similar to DDL operations that can be persisted on TiKV?

| username: TiDBer_jYQINSnf | Original post link

I understand that this GC is a reentrant action, and deleting expired keys does not need to be atomic. This means that if the leader crashes and a new one takes over, it can simply rescan the keys before the xx timestamp and continue deleting them.

| username: 胡杨树旁 | Original post link

Understood, when the GC leader is re-elected, the GC action will be performed again. Thank you.

| username: system | Original post link

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