mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00
Datasources: Add concurrency number to the settings (#81212)
add concurrency to the settings
This commit is contained in:
@ -429,6 +429,11 @@ default_home_dashboard_path =
|
|||||||
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
|
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
|
||||||
datasource_limit = 5000
|
datasource_limit = 5000
|
||||||
|
|
||||||
|
# Number of queries to be executed concurrently. Only for the datasource supports concurrency.
|
||||||
|
# For now only Loki and InfluxDB (with influxql) are supporting concurrency behind the feature flags.
|
||||||
|
# Check datasource documentations for enabling concurrency.
|
||||||
|
concurrent_query_count = 10
|
||||||
|
|
||||||
|
|
||||||
################################### SQL Data Sources #####################
|
################################### SQL Data Sources #####################
|
||||||
[sql_datasources]
|
[sql_datasources]
|
||||||
|
@ -345,6 +345,8 @@ type Cfg struct {
|
|||||||
|
|
||||||
// Data sources
|
// Data sources
|
||||||
DataSourceLimit int
|
DataSourceLimit int
|
||||||
|
// Number of queries to be executed concurrently. Only for the datasource supports concurrency.
|
||||||
|
ConcurrentQueryCount int
|
||||||
|
|
||||||
// SQL Data sources
|
// SQL Data sources
|
||||||
SqlDatasourceMaxOpenConnsDefault int
|
SqlDatasourceMaxOpenConnsDefault int
|
||||||
@ -1933,6 +1935,7 @@ func (cfg *Cfg) GetContentDeliveryURL(prefix string) (string, error) {
|
|||||||
func (cfg *Cfg) readDataSourcesSettings() {
|
func (cfg *Cfg) readDataSourcesSettings() {
|
||||||
datasources := cfg.Raw.Section("datasources")
|
datasources := cfg.Raw.Section("datasources")
|
||||||
cfg.DataSourceLimit = datasources.Key("datasource_limit").MustInt(5000)
|
cfg.DataSourceLimit = datasources.Key("datasource_limit").MustInt(5000)
|
||||||
|
cfg.ConcurrentQueryCount = datasources.Key("concurrent_query_count").MustInt(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cfg *Cfg) readSqlDataSourceSettings() {
|
func (cfg *Cfg) readSqlDataSourceSettings() {
|
||||||
|
Reference in New Issue
Block a user