-
Notifications
You must be signed in to change notification settings - Fork 17
add trigger gc api #379
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
base: v4
Are you sure you want to change the base?
add trigger gc api #379
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v4 #379 +/- ##
=====================================
Coverage ? 56.56%
=====================================
Files ? 36
Lines ? 4819
Branches ? 600
=====================================
Hits ? 2726
Misses ? 1810
Partials ? 283 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| pg_id, (priority == task_priority::emergent) ? "emergent" : "normal"); | ||
| } | ||
|
|
||
| // 3.5 Wait for all GC tasks in this PG to complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may take a long time, right? Just return the job id and let user query the job status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, if too many chunk need to be gc, it probably take a while, so just return a job id, with which the user can query the job status.
| return; | ||
| } | ||
| // Create new job and set as current (replacing any completed job) | ||
| current_gc_job_ = job_info; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to specify the chunk_id, then we can only clean chunks one by one, can we add some concurrency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| private: | ||
| enum class GCJobStatus { PENDING, RUNNING, COMPLETED, FAILED }; | ||
|
|
||
| struct GCJobInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From user's perspective, suggest adding pg_id as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok , sure
0b39e3e to
e08ac14
Compare
1 trigger gc for all chunks
curl -X POST https://127.0.0.1:10443/api/v1/trigger_gc
2 trigger gc for a specific chunk
curl -X POST https://localhost:10443/api/v1/trigger_gc?chunk_id=123
3 query the status of a gc job. ATM, we only support one pending gc job
curl https://localhost:10443/api/v1/gc_job_status?job_id=gc-1703123456789-0