mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-12-02 18:15:38 +08:00
commit
af96050944
@ -35,10 +35,13 @@ fn update_awaiter(receiver: Receiver<()>, env: heed::Env, update_fn: Arc<ArcSwap
|
|||||||
|
|
||||||
match update::update_task(&mut writer, index.clone()) {
|
match update::update_task(&mut writer, index.clone()) {
|
||||||
Ok(Some(status)) => {
|
Ok(Some(status)) => {
|
||||||
if status.result.is_ok() {
|
match status.result {
|
||||||
if let Err(e) = writer.commit() {
|
Ok(_) => {
|
||||||
error!("update transaction failed: {}", e)
|
if let Err(e) = writer.commit() {
|
||||||
|
error!("update transaction failed: {}", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Err(_) => writer.abort(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref callback) = *update_fn.load() {
|
if let Some(ref callback) = *update_fn.load() {
|
||||||
|
@ -167,6 +167,7 @@ impl Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear_all(&self, writer: &mut heed::RwTxn) -> MResult<u64> {
|
pub fn clear_all(&self, writer: &mut heed::RwTxn) -> MResult<u64> {
|
||||||
|
let _ = self.updates_notifier.send(());
|
||||||
update::push_clear_all(writer, self.updates, self.updates_results)
|
update::push_clear_all(writer, self.updates, self.updates_results)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user