-
Notifications
You must be signed in to change notification settings - Fork 31
feat: disable GC for orphaned packages by default #2009
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
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR disables database garbage collection by default by setting the GC frequency to zero seconds both in code and documentation, and updates the warning log to explicitly reference garbage collection. Class diagram for updated GC scheduling logicclassDiagram
class API {
}
class Database {
}
class "GC Scheduler" {
- GC_FREQ: Duration
+ schedule_db_tasks(db: Database)
}
API --> "GC Scheduler" : uses
"GC Scheduler" --> Database : schedules tasks
Flow diagram for updated GC frequency configurationflowchart TD
A[Start API server] --> B[Read TRUSTD_GC_FREQ env var]
B --> C{Is GC_FREQ < 1s?}
C -- Yes --> D[Log: Garbage collection is disabled]
C -- No --> E[Log: GC frequency set]
E --> F[Schedule GC task]
D --> G[Do not schedule GC task]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes - here's some feedback:
- Consider introducing a dedicated flag or Option to represent a disabled GC state instead of using a Duration of zero as a sentinel value.
- Update the changelog or release notes to highlight that garbage collection is now disabled by default so operators are aware of the new behavior.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider introducing a dedicated flag or Option<Duration> to represent a disabled GC state instead of using a Duration of zero as a sentinel value.
- Update the changelog or release notes to highlight that garbage collection is now disabled by default so operators are aware of the new behavior.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2009 +/- ##
==========================================
- Coverage 68.30% 68.30% -0.01%
==========================================
Files 359 359
Lines 19930 19930
Branches 19930 19930
==========================================
- Hits 13614 13613 -1
- Misses 5531 5534 +3
+ Partials 785 783 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/backport |
|
Successfully created backport PR for |
Downstream issue: https://issues.redhat.com/browse/TC-2958
Summary by Sourcery
Disable automatic garbage collection for orphaned packages by default by setting the GC frequency to zero and updating related logging and documentation
New Features:
Enhancements:
Documentation: