databend
databend copied to clipboard
feat: support warehouse-level settings
Summary
Query:
In a write warehouse(cluster_id: w1), we can set:
set warehouse max_threads = 4;
In a query warehouse(cluster_id: w2), we can set:
set warehouse max_threads = 8;
Important Note: These settings adjustments cannot be performed on the management node directly. Instead, the warehouse cluster ID must be retrieved from the configuration prior to executing the set operation.
Metasrv:
The warehouse-level setting key format:
__fd_settings_warehouse/<tenant>/<warehouse>/max_threads
So the warehouse-level in metasrv:
__fd_settings_warehouse/mytenant/w1/max_threads, 4
__fd_settings_warehouse/mytenant/w2/max_threads, 8
For executing a query, the process involves first listing the global level settings. Subsequently, it lists the warehouse level settings, which serve to override the global settings as necessary.