Skip to content

Commit

Permalink
add env parameter for thread pool size
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz committed Aug 8, 2024
1 parent e911e99 commit 31ff7e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quickwit/quickwit-search/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ pub type SearcherPool = Pool<SocketAddr, SearchServiceClient>;

fn search_thread_pool() -> &'static ThreadPool {
static SEARCH_THREAD_POOL: OnceLock<ThreadPool> = OnceLock::new();
SEARCH_THREAD_POOL.get_or_init(|| ThreadPool::new("search", None))
let search_thread_pool_size = quickwit_common::get_from_env_opt("QW_SEARCH_THREAD_POOL_SIZE");
SEARCH_THREAD_POOL.get_or_init(|| ThreadPool::new("search", search_thread_pool_size))
}

/// GlobalDocAddress serves as a hit address.
Expand Down

0 comments on commit 31ff7e1

Please sign in to comment.