-
Notifications
You must be signed in to change notification settings - Fork 83
fix(clp-package): Start garbage collector as part of the "all" and "controller" targets; Validate retention periods aren't configured when using the Presto query engine. #1205
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
Changes from all commits
d5ffb33
0f556b5
71ba53f
d9afb69
7197b09
ad8d23a
e5da5a7
bf73952
fa84bbf
21e254d
2bd23f0
3a3f0b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |||||||||||||||||||||
| COMPRESSION_WORKER_COMPONENT_NAME, | ||||||||||||||||||||||
| CONTROLLER_TARGET_NAME, | ||||||||||||||||||||||
| DB_COMPONENT_NAME, | ||||||||||||||||||||||
| GARBAGE_COLLECTOR_NAME, | ||||||||||||||||||||||
| GARBAGE_COLLECTOR_COMPONENT_NAME, | ||||||||||||||||||||||
| QUERY_SCHEDULER_COMPONENT_NAME, | ||||||||||||||||||||||
| QUERY_WORKER_COMPONENT_NAME, | ||||||||||||||||||||||
| QUEUE_COMPONENT_NAME, | ||||||||||||||||||||||
|
|
@@ -85,7 +85,7 @@ def main(argv): | |||||||||||||||||||||
| component_args_parser.add_parser(COMPRESSION_WORKER_COMPONENT_NAME) | ||||||||||||||||||||||
| component_args_parser.add_parser(QUERY_WORKER_COMPONENT_NAME) | ||||||||||||||||||||||
| component_args_parser.add_parser(WEBUI_COMPONENT_NAME) | ||||||||||||||||||||||
| component_args_parser.add_parser(GARBAGE_COLLECTOR_NAME) | ||||||||||||||||||||||
| component_args_parser.add_parser(GARBAGE_COLLECTOR_COMPONENT_NAME) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| parsed_args = args_parser.parse_args(argv[1:]) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
@@ -132,8 +132,8 @@ def main(argv): | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| already_exited_containers = [] | ||||||||||||||||||||||
| force = parsed_args.force | ||||||||||||||||||||||
| if target in (ALL_TARGET_NAME, GARBAGE_COLLECTOR_NAME): | ||||||||||||||||||||||
| container_name = f"clp-{GARBAGE_COLLECTOR_NAME}-{instance_id}" | ||||||||||||||||||||||
| if target in (ALL_TARGET_NAME, GARBAGE_COLLECTOR_COMPONENT_NAME): | ||||||||||||||||||||||
| container_name = f"clp-{GARBAGE_COLLECTOR_COMPONENT_NAME}-{instance_id}" | ||||||||||||||||||||||
| stop_running_container(container_name, already_exited_containers, force) | ||||||||||||||||||||||
|
Comment on lines
+135
to
137
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Clean up the GC container config file after stopping (consistency with other components) Other components (e.g., reducer, schedulers) remove their generated config files from logs_dir after stopping. Do the same for GC to avoid stale files. - if target in (ALL_TARGET_NAME, GARBAGE_COLLECTOR_COMPONENT_NAME):
- container_name = f"clp-{GARBAGE_COLLECTOR_COMPONENT_NAME}-{instance_id}"
- stop_running_container(container_name, already_exited_containers, force)
+ if target in (ALL_TARGET_NAME, GARBAGE_COLLECTOR_COMPONENT_NAME):
+ container_name = f"clp-{GARBAGE_COLLECTOR_COMPONENT_NAME}-{instance_id}"
+ stop_running_container(container_name, already_exited_containers, force)
+
+ container_config_file_path = logs_dir / f"{container_name}.yml"
+ if container_config_file_path.exists():
+ container_config_file_path.unlink()📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| if target in (ALL_TARGET_NAME, WEBUI_COMPONENT_NAME): | ||||||||||||||||||||||
| container_name = f"clp-{WEBUI_COMPONENT_NAME}-{instance_id}" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
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.
💡 Verification agent
🧩 Analysis chain
GC start is correctly gated by components_to_start, but PRESTO currently filters GC out
Given the current implementation of get_runnable_components, PRESTO returns COMPRESSION_COMPONENTS | UI_COMPONENTS, excluding STORAGE_MANAGEMENT_COMPONENTS. That means GC won’t start for PRESTO even when targeted via CONTROLLER or ALL.
This is addressed by my earlier suggestion in clp_config.py to compute PRESTO_RUNNABLE_COMPONENTS = ALL_COMPONENTS - PRESTO_INCOMPATIBLE_COMPONENTS.
🏁 Script executed:
Length of output: 42289
GC start is correctly gated by components_to_start, but PRESTO currently filters GC out
Verified: clp_config.get_runnable_components returns COMPRESSION_COMPONENTS | UI_COMPONENTS when QueryEngine.PRESTO, which excludes STORAGE_MANAGEMENT_COMPONENTS (garbage_collector). start_clp.py intersects target components with runnable_components before starting, so garbage_collector will not be started for PRESTO.
Please update to compute PRESTO runnable components from ALL_COMPONENTS (so GC can be included when appropriate):
Files to inspect/fix:
Suggested change (example patch) to clp_config.py:
Reason: keep the source-of-truth as ALL_COMPONENTS and subtract explicit PRESTO-incompatible pieces to avoid accidentally excluding STORAGE_MANAGEMENT_COMPONENTS (garbage_collector).
🤖 Prompt for AI Agents