From 691e2a3c1d8d12a981c3abe4b4824fa3da08ca9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 30 Dec 2019 15:28:28 +0100 Subject: [PATCH] Fix a blocking channel, appearing like a deadlock --- meilisearch-core/src/database.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-core/src/database.rs b/meilisearch-core/src/database.rs index 7dd4d9866..399117254 100644 --- a/meilisearch-core/src/database.rs +++ b/meilisearch-core/src/database.rs @@ -168,7 +168,7 @@ impl Database { // open the previously aggregated indexes let mut indexes = HashMap::new(); for index_uid in must_open { - let (sender, receiver) = crossbeam_channel::bounded(100); + let (sender, receiver) = crossbeam_channel::unbounded(); let index = match store::open(&env, &update_env, &index_uid, sender.clone())? { Some(index) => index, None => { @@ -233,7 +233,7 @@ impl Database { match indexes_lock.entry(name.to_owned()) { Entry::Occupied(_) => Err(crate::Error::IndexAlreadyExists), Entry::Vacant(entry) => { - let (sender, receiver) = crossbeam_channel::bounded(100); + let (sender, receiver) = crossbeam_channel::unbounded(); let index = store::create(&self.env, &self.update_env, name, sender)?; let mut writer = self.env.typed_write_txn::()?;