Skip to content
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

meta/tikv: add background GC worker for TiKV #3262

Merged
merged 6 commits into from
Mar 1, 2023
Merged

meta/tikv: add background GC worker for TiKV #3262

merged 6 commits into from
Mar 1, 2023

Conversation

SandyXSD
Copy link
Contributor

@SandyXSD SandyXSD commented Feb 23, 2023

The GC cleans up old entries before 3 hours by default, and can be configured with the query string "gc-interval".
It should be disabled by setting "gc-interval=0" if there's already TiDB daemon or any other service that can trigger the GC deployed.

Refs: https://github.com/tikv/client-go/blob/master/examples/gcworker/gcworker.go

@codecov-commenter
Copy link

Codecov Report

Base: 55.51% // Head: 55.37% // Decreases project coverage by -0.15% ⚠️

Coverage data is based on head (b8d4db5) compared to base (944ab73).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3262      +/-   ##
==========================================
- Coverage   55.51%   55.37%   -0.15%     
==========================================
  Files         142      142              
  Lines       33339    33362      +23     
==========================================
- Hits        18508    18473      -35     
- Misses      12885    12941      +56     
- Partials     1946     1948       +2     
Impacted Files Coverage Δ
pkg/meta/tkv.go 70.79% <0.00%> (-0.62%) ⬇️
pkg/meta/tkv_badger.go 73.38% <0.00%> (-0.54%) ⬇️
pkg/meta/tkv_etcd.go 77.58% <0.00%> (-0.34%) ⬇️
pkg/meta/tkv_fdb.go 79.41% <0.00%> (-0.79%) ⬇️
pkg/meta/tkv_mem.go 91.90% <0.00%> (-0.54%) ⬇️
pkg/meta/tkv_tikv.go 62.75% <0.00%> (-3.19%) ⬇️
pkg/vfs/reader.go 79.27% <0.00%> (-2.38%) ⬇️
pkg/fs/fs.go 73.29% <0.00%> (-1.65%) ⬇️
pkg/vfs/handle.go 83.58% <0.00%> (-0.75%) ⬇️
pkg/chunk/disk_cache.go 73.98% <0.00%> (-0.44%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

pkg/meta/tkv.go Outdated Show resolved Hide resolved
@davies davies merged commit a8f520a into main Mar 1, 2023
@davies davies deleted the add-tikv-gc branch March 1, 2023 11:52
@davies davies added the backport-1.0 Backport to release-1.0 branch label Mar 1, 2023
@SandyXSD SandyXSD mentioned this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-1.0 Backport to release-1.0 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants