From 50f0fbb05c7f437be05e737819ddf8c301db2977 Mon Sep 17 00:00:00 2001 From: many Date: Tue, 20 Oct 2020 16:21:46 +0200 Subject: [PATCH] remove useless function after health route refacto #1026 --- Cargo.lock | 6 +++--- meilisearch-core/src/database.rs | 18 ------------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19ef76d70..b55c1c8a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1898,8 +1898,7 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pest" version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +source = "git+https://github.com/pest-parser/pest.git?rev=51fd1d49f1041f7839975664ef71fe15c7dcaf67#51fd1d49f1041f7839975664ef71fe15c7dcaf67" dependencies = [ "ucd-trie", ] @@ -1907,7 +1906,8 @@ dependencies = [ [[package]] name = "pest" version = "2.1.3" -source = "git+https://github.com/pest-parser/pest.git?rev=51fd1d49f1041f7839975664ef71fe15c7dcaf67#51fd1d49f1041f7839975664ef71fe15c7dcaf67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" dependencies = [ "ucd-trie", ] diff --git a/meilisearch-core/src/database.rs b/meilisearch-core/src/database.rs index e8f3c7408..82f5fa89d 100644 --- a/meilisearch-core/src/database.rs +++ b/meilisearch-core/src/database.rs @@ -28,7 +28,6 @@ pub type MainReader = heed::RoTxn; pub type UpdateWriter<'a> = heed::RwTxn<'a, UpdateT>; pub type UpdateReader = heed::RoTxn; -const UNHEALTHY_KEY: &str = "_is_unhealthy"; const LAST_UPDATE_KEY: &str = "last-update"; pub struct MainT; @@ -533,23 +532,6 @@ impl Database { Ok(()) } - pub fn set_healthy(&self, writer: &mut heed::RwTxn) -> MResult<()> { - let common_store = self.common_store(); - common_store.delete::<_, Str>(writer, UNHEALTHY_KEY)?; - Ok(()) - } - - pub fn set_unhealthy(&self, writer: &mut heed::RwTxn) -> MResult<()> { - let common_store = self.common_store(); - common_store.put::<_, Str, Unit>(writer, UNHEALTHY_KEY, &())?; - Ok(()) - } - - pub fn get_health(&self, reader: &heed::RoTxn) -> MResult> { - let common_store = self.common_store(); - Ok(common_store.get::<_, Str, Unit>(&reader, UNHEALTHY_KEY)?) - } - pub fn compute_stats(&self, writer: &mut MainWriter, index_uid: &str) -> MResult<()> { let index = match self.open_index(&index_uid) { Some(index) => index,