mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-24 13:40:31 +01:00
fix update files created in the wrong place
This commit is contained in:
parent
e285404c3e
commit
3cd799a744
@ -59,7 +59,9 @@ impl ApiKeys {
|
||||
impl Data {
|
||||
pub fn new(options: Opt) -> anyhow::Result<Data> {
|
||||
let path = options.db_path.clone();
|
||||
|
||||
//let indexer_opts = options.indexer_options.clone();
|
||||
|
||||
create_dir_all(&path)?;
|
||||
let index_controller = IndexController::new(&path);
|
||||
|
||||
|
@ -196,10 +196,10 @@ pub struct IndexActorHandle {
|
||||
}
|
||||
|
||||
impl IndexActorHandle {
|
||||
pub fn new() -> Self {
|
||||
pub fn new(path: impl AsRef<Path>) -> Self {
|
||||
let (sender, receiver) = mpsc::channel(100);
|
||||
|
||||
let store = MapIndexStore::new("data.ms");
|
||||
let store = MapIndexStore::new(path);
|
||||
let actor = IndexActor::new(receiver, store);
|
||||
tokio::task::spawn(actor.run());
|
||||
Self { sender }
|
||||
|
@ -33,7 +33,7 @@ enum IndexControllerMsg {
|
||||
impl IndexController {
|
||||
pub fn new(path: impl AsRef<Path>) -> Self {
|
||||
let uuid_resolver = uuid_resolver::UuidResolverHandle::new();
|
||||
let index_actor = index_actor::IndexActorHandle::new();
|
||||
let index_actor = index_actor::IndexActorHandle::new(&path);
|
||||
let update_handle = update_actor::UpdateActorHandle::new(index_actor.clone(), &path);
|
||||
Self { uuid_resolver, index_handle: index_actor, update_handle }
|
||||
}
|
||||
|
@ -112,9 +112,12 @@ where D: AsRef<[u8]> + Sized + 'static,
|
||||
let (sender, receiver) = mpsc::channel(100);
|
||||
let mut options = heed::EnvOpenOptions::new();
|
||||
options.map_size(4096 * 100_000);
|
||||
let mut path = PathBuf::new();
|
||||
path.push("data.ms");
|
||||
path.push("updates");
|
||||
|
||||
let path = path
|
||||
.as_ref()
|
||||
.to_owned()
|
||||
.join("updates");
|
||||
|
||||
create_dir_all(&path).unwrap();
|
||||
let index_handle_clone = index_handle.clone();
|
||||
let store = UpdateStore::open(options, &path, move |meta, file| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user