From 3b8f71446306fafc37f66b190252151dc994fcf2 Mon Sep 17 00:00:00 2001 From: Trevor Hilton Date: Mon, 9 Dec 2024 10:32:42 -0500 Subject: [PATCH] refactor: remove query concurrency limit --- influxdb3/src/commands/serve.rs | 1 - influxdb3_server/src/lib.rs | 1 - influxdb3_server/src/query_executor.rs | 6 ++---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/influxdb3/src/commands/serve.rs b/influxdb3/src/commands/serve.rs index 14fb08c671d..ecbcc1c6138 100644 --- a/influxdb3/src/commands/serve.rs +++ b/influxdb3/src/commands/serve.rs @@ -517,7 +517,6 @@ pub async fn command(config: Config) -> Result<()> { exec: Arc::clone(&exec), metrics: Arc::clone(&metrics), datafusion_config: Arc::new(config.datafusion_config), - concurrent_query_limit: 10, query_log_size: config.query_log_size, telemetry_store: Arc::clone(&telemetry_store), sys_events_store: Arc::clone(&sys_events_store), diff --git a/influxdb3_server/src/lib.rs b/influxdb3_server/src/lib.rs index 8b564603796..b834e862af9 100644 --- a/influxdb3_server/src/lib.rs +++ b/influxdb3_server/src/lib.rs @@ -830,7 +830,6 @@ mod tests { exec: Arc::clone(&exec), metrics: Arc::clone(&metrics), datafusion_config: Default::default(), - concurrent_query_limit: 10, query_log_size: 10, telemetry_store: Arc::clone(&sample_telem_store), sys_events_store: Arc::clone(&sys_events_store), diff --git a/influxdb3_server/src/query_executor.rs b/influxdb3_server/src/query_executor.rs index 536908fd421..bf22e5aa39c 100644 --- a/influxdb3_server/src/query_executor.rs +++ b/influxdb3_server/src/query_executor.rs @@ -41,6 +41,7 @@ use std::any::Any; use std::collections::HashMap; use std::fmt::Debug; use std::sync::Arc; +use tokio::sync::Semaphore; use trace::ctx::SpanContext; use trace::span::{Span, SpanExt, SpanRecorder}; use trace_http::ctx::RequestLogContext; @@ -68,7 +69,6 @@ pub struct CreateQueryExecutorArgs { pub exec: Arc, pub metrics: Arc, pub datafusion_config: Arc>, - pub concurrent_query_limit: usize, pub query_log_size: usize, pub telemetry_store: Arc, pub sys_events_store: Arc, @@ -82,7 +82,6 @@ impl QueryExecutorImpl { exec, metrics, datafusion_config, - concurrent_query_limit, query_log_size, telemetry_store, sys_events_store, @@ -93,7 +92,7 @@ impl QueryExecutorImpl { &[("semaphore", "query_execution")], )); let query_execution_semaphore = - Arc::new(semaphore_metrics.new_semaphore(concurrent_query_limit)); + Arc::new(semaphore_metrics.new_semaphore(Semaphore::MAX_PERMITS)); let query_log = Arc::new(QueryLog::new( query_log_size, Arc::new(iox_time::SystemProvider::new()), @@ -716,7 +715,6 @@ mod tests { exec, metrics, datafusion_config, - concurrent_query_limit: 10, query_log_size: 10, telemetry_store, sys_events_store,