Skip to content

Support GC #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ekexium opened this issue Sep 30, 2020 · 10 comments
Open

Support GC #180

ekexium opened this issue Sep 30, 2020 · 10 comments

Comments

@ekexium
Copy link
Collaborator

ekexium commented Sep 30, 2020

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.

@nrc
Copy link
Collaborator

nrc commented Dec 8, 2020

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).

@ekexium
Copy link
Collaborator Author

ekexium commented Dec 9, 2020

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."

@nrc
Copy link
Collaborator

nrc commented Dec 10, 2020

The link is broken for me. Does that mean we don't need to support the gc message at all?

@ekexium
Copy link
Collaborator Author

ekexium commented Dec 10, 2020

Yes, I think. The link is updated.

@nrc
Copy link
Collaborator

nrc commented Jan 19, 2021

@ekexium is it ok to close this issue now? We have a gc function, which I think does what it should.

@ekexium
Copy link
Collaborator Author

ekexium commented Jan 20, 2021

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?

@andylokandy
Copy link
Collaborator

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.

@frostyplanet
Copy link

What's the status of the GC feature ?

@andylokandy
Copy link
Collaborator

It's still the same.

@frostyplanet
Copy link

frostyplanet commented Dec 16, 2021

May I ask the difference of current implementation from the one in tikv/client-go code ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants