fix snapshot bugs

This commit is contained in:
mpostma 2021-03-22 19:19:37 +01:00
parent d73fbdef2e
commit e9da191b7d
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
6 changed files with 36 additions and 21 deletions

View file

@ -21,6 +21,7 @@ use tokio::time::sleep;
use crate::index::{Document, SearchQuery, SearchResult};
use crate::index::{Facets, Settings, UpdateResult};
use crate::option::Opt;
use crate::helpers::compression;
use snapshot::SnapshotService;
pub use updates::{Failed, Processed, Processing};
@ -67,6 +68,10 @@ impl IndexController {
let index_size = options.max_mdb_size.get_bytes() as usize;
let update_store_size = options.max_udb_size.get_bytes() as usize;
if let Some(ref path) = options.import_snapshot {
compression::from_tar_gz(path, &options.db_path)?;
}
let uuid_resolver = uuid_resolver::UuidResolverHandle::new(&path)?;
let index_handle = index_actor::IndexActorHandle::new(&path, index_size)?;
let update_handle = update_actor::UpdateActorHandle::new(