mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-18 08:48:32 +08:00
crash when the actor have no inbox
This commit is contained in:
parent
991d8e1ec6
commit
1a6dcec83a
@ -4,7 +4,7 @@ use crate::index_controller::{index_actor, update_actor, uuid_resolver, IndexMet
|
|||||||
use async_stream::stream;
|
use async_stream::stream;
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
use log::{error, info, warn};
|
use log::{error, info};
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashSet,
|
collections::HashSet,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
@ -114,19 +114,11 @@ where
|
|||||||
|
|
||||||
match task_result {
|
match task_result {
|
||||||
Ok(Ok(())) => {
|
Ok(Ok(())) => {
|
||||||
if let Some(ref mut info) = *dump_info.write().await {
|
(*dump_info.write().await).as_mut().expect("Dump actor should have an inbox").done();
|
||||||
info.done();
|
|
||||||
} else {
|
|
||||||
warn!("dump actor was in an inconsistant state");
|
|
||||||
}
|
|
||||||
info!("Dump succeed");
|
info!("Dump succeed");
|
||||||
}
|
}
|
||||||
Ok(Err(e)) => {
|
Ok(Err(e)) => {
|
||||||
if let Some(ref mut info) = *dump_info.write().await {
|
(*dump_info.write().await).as_mut().expect("Dump actor should have an inbox").with_error(e.to_string());
|
||||||
info.with_error(e.to_string());
|
|
||||||
} else {
|
|
||||||
warn!("dump actor was in an inconsistant state");
|
|
||||||
}
|
|
||||||
error!("Dump failed: {}", e);
|
error!("Dump failed: {}", e);
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user