use options max db sizes

This commit is contained in:
mpostma 2021-03-13 10:09:10 +01:00
parent 49b74b587a
commit 99c89cf2ba
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
5 changed files with 27 additions and 18 deletions

View file

@ -59,10 +59,10 @@ pub struct IndexController {
}
impl IndexController {
pub fn new(path: impl AsRef<Path>) -> anyhow::Result<Self> {
pub fn new(path: impl AsRef<Path>, index_size: usize, update_store_size: usize) -> anyhow::Result<Self> {
let uuid_resolver = uuid_resolver::UuidResolverHandle::new(&path)?;
let index_actor = index_actor::IndexActorHandle::new(&path)?;
let update_handle = update_actor::UpdateActorHandle::new(index_actor.clone(), &path)?;
let index_actor = index_actor::IndexActorHandle::new(&path, index_size)?;
let update_handle = update_actor::UpdateActorHandle::new(index_actor.clone(), &path, update_store_size)?;
Ok(Self { uuid_resolver, index_handle: index_actor, update_handle })
}