-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[ENH]: add config param to garbage collector to control how many collections are fetched from SysDb #5275
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
…ections are fetched from SysDb
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Add Config Parameter to Control SysDb Collection Fetch Limit in GC This pull request introduces a new optional configuration parameter, Key Changes• Added Affected Areas• rust/ This summary was automatically generated by @propel-code-bot |
rust/garbage_collector/src/config.rs
Outdated
@@ -41,6 +41,7 @@ pub struct GarbageCollectorConfig { | |||
)] | |||
pub(super) version_cutoff_time: Duration, | |||
pub(super) max_collections_to_gc: u32, | |||
pub(super) max_collection_to_fetch: Option<u32>, |
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.
[BestPractice]
For consistency with the existing max_collections_to_gc
parameter, consider renaming this to max_collections_to_fetch
(plural collections
). This would improve readability and maintain consistency in naming conventions for related configuration parameters. This change would need to be applied in rust/garbage_collector/src/garbage_collector_component.rs
as well.
pub(super) max_collection_to_fetch: Option<u32>, | |
pub(super) max_collections_to_fetch: Option<u32>, |
⚡ Committable suggestion
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
…ections are fetched from SysDb (#5275)
Co-authored-by: Max Isom <codetheweb@users.noreply.github.com>
Description of changes
When
max_collections_to_gc
is small, all collections fetched by GC may be disabled by the GC config, preventing any non-disabled collections from being GC'ed. This adds a new config parameter to allow GC to initially overfetch collections before then filtering and limiting tomax_collections_to_gc
.Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustMigration plan
Backwards compatible because new config param is optional.
Observability plan
What is the plan to instrument and monitor this change?
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?