Create temp threadpool with all CPUs in dump

This commit is contained in:
nnethercott
2025-04-27 00:51:26 +02:00
parent 9fd9fcb03e
commit 648b2876f6
6 changed files with 40 additions and 11 deletions

View File

@ -228,8 +228,10 @@ where
let possible_embedding_mistakes =
crate::vector::error::PossibleEmbeddingMistakes::new(&field_distribution);
let pool_guard = self.indexer_config.thread_pool.read().unwrap();
let backup_pool;
let pool = match self.indexer_config.thread_pool {
let pool = match &*pool_guard {
Some(ref pool) => pool,
None => {
// We initialize a backup pool with the default