Support GC
Opened this issue · 10 comments
TiKV uses MVCC to support transactions, thus GC is needed to remove stale data.
Current implementation of rust-client does not provide GC functionalities.
A workaround is using the script which calls TiDB's GC functions to manually trigger GC.
An initial implementation of GC #182 .
If we let users manage GC, we should provide a guide.
I noticed that the gc function does not use the gc request, which is a bit confusing. AIUI, we currently gc locks but not deleted data (the delete ranges step) or old data (which uses the gc request).
I noticed that the gc function does not use the gc request, which is a bit confusing. AIUI, we currently gc locks but not deleted data (the delete ranges step) or old data (which uses the gc request).
The new GC mechanism(https://docs.pingcap.com/tidb/stable/garbage-collection-overview#do-gc) only requires updating safepoint on PD. "TiKV automatically detects the change of safe point and performs GC for all Region leaders on the current node."
The link is broken for me. Does that mean we don't need to support the gc message at all?
Yes, I think. The link is updated.
@ekexium is it ok to close this issue now? We have a gc
function, which I think does what it should.
GC support is not in perfect state, so I prefer to keep it open.
The gc
function is not well tested yet. And I think there are open questions. For example, should we provide automatic GC?
I've written up an RFC for future work on GC refractory. Once this is implemented, the client may need to support editing GC barrier via PD.
What's the status of the GC feature ?
It's still the same.
May I ask the difference of current implementation from the one in tikv/client-go code ?