mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Create temp threadpool with all CPUs in dump
This commit is contained in:
parent
9fd9fcb03e
commit
648b2876f6
6 changed files with 40 additions and 11 deletions
|
@ -115,7 +115,8 @@ impl IndexScheduler {
|
|||
|
||||
let local_pool;
|
||||
let indexer_config = self.index_mapper.indexer_config();
|
||||
let pool = match &indexer_config.thread_pool {
|
||||
let pool_guard = indexer_config.thread_pool.read().unwrap();
|
||||
let pool = match &*pool_guard {
|
||||
Some(pool) => pool,
|
||||
None => {
|
||||
local_pool = ThreadPoolNoAbortBuilder::new()
|
||||
|
@ -268,7 +269,8 @@ impl IndexScheduler {
|
|||
if task.error.is_none() {
|
||||
let local_pool;
|
||||
let indexer_config = self.index_mapper.indexer_config();
|
||||
let pool = match &indexer_config.thread_pool {
|
||||
let pool_guard = indexer_config.thread_pool.read().unwrap();
|
||||
let pool = match &*pool_guard {
|
||||
Some(pool) => pool,
|
||||
None => {
|
||||
local_pool = ThreadPoolNoAbortBuilder::new()
|
||||
|
@ -431,7 +433,8 @@ impl IndexScheduler {
|
|||
if !tasks.iter().all(|res| res.error.is_some()) {
|
||||
let local_pool;
|
||||
let indexer_config = self.index_mapper.indexer_config();
|
||||
let pool = match &indexer_config.thread_pool {
|
||||
let pool_guard = indexer_config.thread_pool.read().unwrap();
|
||||
let pool = match &*pool_guard {
|
||||
Some(pool) => pool,
|
||||
None => {
|
||||
local_pool = ThreadPoolNoAbortBuilder::new()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue