mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
error on meili database version mismatch
This commit is contained in:
parent
308630c094
commit
f5a936614a
3 changed files with 89 additions and 27 deletions
|
@ -4,6 +4,7 @@ use std::sync::Arc;
|
|||
use meilisearch_core::{Database, DatabaseOptions};
|
||||
use sha2::Digest;
|
||||
use sysinfo::Pid;
|
||||
use log::error;
|
||||
|
||||
use crate::index_update_callback;
|
||||
use crate::option::Opt;
|
||||
|
@ -66,7 +67,13 @@ impl Data {
|
|||
|
||||
let http_payload_size_limit = opt.http_payload_size_limit;
|
||||
|
||||
let db = Arc::new(Database::open_or_create(opt.db_path, db_opt).unwrap());
|
||||
let db = match Database::open_or_create(opt.db_path, db_opt) {
|
||||
Ok(db) => Arc::new(db),
|
||||
Err(e) => {
|
||||
error!("{}", e);
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
let mut api_keys = ApiKeys {
|
||||
master: opt.master_key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue