mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
review changes
This commit is contained in:
parent
763ee521be
commit
56686dee40
10 changed files with 24 additions and 23 deletions
|
@ -1,6 +1,7 @@
|
|||
use std::path::{Path, PathBuf};
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::bail;
|
||||
use log::{error, info};
|
||||
use tokio::fs;
|
||||
use tokio::task::spawn_blocking;
|
||||
|
@ -108,7 +109,7 @@ pub fn load_snapshot(
|
|||
}
|
||||
}
|
||||
} else if db_path.as_ref().exists() && !ignore_snapshot_if_db_exists {
|
||||
todo!(
|
||||
bail!(
|
||||
"database already exists at {:?}, try to delete it or rename it",
|
||||
db_path
|
||||
.as_ref()
|
||||
|
@ -116,7 +117,7 @@ pub fn load_snapshot(
|
|||
.unwrap_or_else(|_| db_path.as_ref().to_owned())
|
||||
)
|
||||
} else if !snapshot_path.as_ref().exists() && !ignore_missing_snapshot {
|
||||
todo!(
|
||||
bail!(
|
||||
"snapshot doesn't exist at {:?}",
|
||||
snapshot_path
|
||||
.as_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue