Isolating queries within a YQL-agent
Warning
The following functionality is available for queries in Query Tracker version 0.1.2 and later.
By default, a YQL-agent runs all queries as threads within a single process. This may lead to memory leaks or cause all queries to fail because an error in one query.
Query isolation prevents these issues by executing each query in a separate process. To enable this feature, you need to override the configuration of the YQL-agent.
For more information about the general mechanism for overriding cluster component configurations, see the relevant section.
How to override a YQL-agent configuration
-
Create a
*.yamlfile with a Kubernetes ConfigMap as shown in the example. -
Add a
ytserver-yql-agent.ysonkey if the ConfigMap doesn't already include it. Otherwise, edit the existing key. -
In the
process_plugin_configfield, add a configuration:Sample YSON configuration
ytserver-yql-agent.yson: | {"yql_agent"={ "process_plugin_config" = { "enabled" = %true; "log_manager_template" = { "abort_on_alert" = %true; "compression_thread_count" = 4; "rules" = [ { "exclude_categories" = [ "Bus"; "Concurrency"; ]; "family" = "plain_text"; "min_level" = "debug"; "writers" = [ "debug-yql-plugin"; ]; }; { "family" = "plain_text"; "min_level" = "error"; "writers" = [ "stderr-yql-plugin"; ]; }; { "family" = "plain_text"; "min_level" = "info"; "writers" = [ "info-yql-plugin"; ]; }; ]; "writers" = { "debug-yql-plugin" = { "file_name" = "/yt/yql-agent-slots-root-path/yql-agent.debug.log"; "type" = "file"; }; "info-yql-plugin" = { "file_name" = "/yt/yql-agent-slots-root-path/yql-agent.log"; "type" = "file"; }; "stderr-yql-plugin" = { "file_name" = "/yt/yql-agent-slots-root-path/yql-agent.error.log"; "type" = "file"; }; }; }; "slot_count" = 8; "slots_root_path" = "/yt/yql-agent-slots-root-path"; }; // other parameters of YQL-agent };} -
Reference the ConfigMap in the YTsaurus specification as shown in Configuration overrides.