databend icon indicating copy to clipboard operation
databend copied to clipboard

feat: support warehouse-level settings

Open BohuTANG opened this issue 3 months ago • 0 comments

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.

BohuTANG avatar Mar 27 '24 07:03 BohuTANG