mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-11 05:54:30 +01:00
Merge #1028
1028: Clean external contributions r=Kerollmops a=LegendreM We accepted some unperfect external PRs, this one is here to clean this: - clean PR #946 (remove changelog line and add forgotten newline) - remove useless function after health route refacto #1026 Co-authored-by: many <maxime@meilisearch.com> Co-authored-by: Many <legendre.maxime.isn@gmail.com>
This commit is contained in:
commit
0a9c9670e7
@ -1,6 +1,5 @@
|
||||
## v0.15.0
|
||||
|
||||
- Dumps (#887)
|
||||
- Update actix-web dependency to 3.0.0 (#963)
|
||||
- Consider an empty query to be a placeholder search (#916)
|
||||
|
||||
|
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -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",
|
||||
]
|
||||
|
@ -28,7 +28,6 @@ pub type MainReader = heed::RoTxn<MainT>;
|
||||
pub type UpdateWriter<'a> = heed::RwTxn<'a, UpdateT>;
|
||||
pub type UpdateReader = heed::RoTxn<UpdateT>;
|
||||
|
||||
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<MainT>) -> MResult<()> {
|
||||
let common_store = self.common_store();
|
||||
common_store.delete::<_, Str>(writer, UNHEALTHY_KEY)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_unhealthy(&self, writer: &mut heed::RwTxn<MainT>) -> MResult<()> {
|
||||
let common_store = self.common_store();
|
||||
common_store.put::<_, Str, Unit>(writer, UNHEALTHY_KEY, &())?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get_health(&self, reader: &heed::RoTxn<MainT>) -> MResult<Option<()>> {
|
||||
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,
|
||||
|
@ -806,4 +806,4 @@ async fn test_facets_distribution_attribute() {
|
||||
});
|
||||
|
||||
assert_json_eq!(expected, response, ordered: true);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user