From 2097554c09393809aae724efb82c1e1bb21948ed Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 16 Jun 2021 19:50:15 +0200 Subject: [PATCH 1/3] fix the cli --- meilisearch-http/src/index_controller/mod.rs | 8 ++++---- meilisearch-http/src/option.rs | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meilisearch-http/src/index_controller/mod.rs b/meilisearch-http/src/index_controller/mod.rs index 0c801558b..ab244d7b2 100644 --- a/meilisearch-http/src/index_controller/mod.rs +++ b/meilisearch-http/src/index_controller/mod.rs @@ -82,8 +82,8 @@ pub struct Stats { impl IndexController { pub fn new(path: impl AsRef, options: &Opt) -> anyhow::Result { - let index_size = options.max_mdb_size.get_bytes() as usize; - let update_store_size = options.max_udb_size.get_bytes() as usize; + let index_size = options.max_index_size.get_bytes() as usize; + let update_store_size = options.max_index_size.get_bytes() as usize; if let Some(ref path) = options.import_snapshot { info!("Loading from snapshot {:?}", path); @@ -97,7 +97,7 @@ impl IndexController { load_dump( &options.db_path, src_path, - options.max_mdb_size.get_bytes() as usize, + options.max_index_size.get_bytes() as usize, options.max_udb_size.get_bytes() as usize, &options.indexer_options, )?; @@ -116,7 +116,7 @@ impl IndexController { &options.dumps_dir, uuid_resolver.clone(), update_handle.clone(), - options.max_mdb_size.get_bytes() as usize, + options.max_index_size.get_bytes() as usize, options.max_udb_size.get_bytes() as usize, )?; diff --git a/meilisearch-http/src/option.rs b/meilisearch-http/src/option.rs index 8f925bad8..d78bfd37e 100644 --- a/meilisearch-http/src/option.rs +++ b/meilisearch-http/src/option.rs @@ -109,15 +109,15 @@ pub struct Opt { pub no_analytics: bool, /// The maximum size, in bytes, of the main lmdb database directory - #[structopt(long, env = "MEILI_MAX_MDB_SIZE", default_value = "100 GiB")] - pub max_mdb_size: Byte, + #[structopt(long, env = "MEILI_MAX_INDEX_SIZE", default_value = "100 GiB")] + pub max_index_size: Byte, /// The maximum size, in bytes, of the update lmdb database directory - #[structopt(long, env = "MEILI_MAX_UDB_SIZE", default_value = "10 GiB")] + #[structopt(long, env = "MEILI_MAX_UDB_SIZE", default_value = "100 GiB")] pub max_udb_size: Byte, /// The maximum size, in bytes, of accepted JSON payloads - #[structopt(long, env = "MEILI_HTTP_PAYLOAD_SIZE_LIMIT", default_value = "10 MiB")] + #[structopt(long, env = "MEILI_HTTP_PAYLOAD_SIZE_LIMIT", default_value = "100 MB")] pub http_payload_size_limit: Byte, /// Read server certificates from CERTFILE. @@ -184,7 +184,7 @@ pub struct Opt { #[structopt(long, env = "MEILI_DUMPS_DIR", default_value = "dumps/")] pub dumps_dir: PathBuf, - /// Import a dump from the specified path, must be a `.tar.gz` file. + /// Import a dump from the specified path, must be a `.dump` file. #[structopt(long, conflicts_with = "import-snapshot")] pub import_dump: Option, From 1cf9f43dfe4dedecdbd86e12827afe8144be9337 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 16 Jun 2021 20:48:37 +0200 Subject: [PATCH 2/3] fix the tests --- meilisearch-http/tests/common/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch-http/tests/common/server.rs b/meilisearch-http/tests/common/server.rs index bf6c95474..cd9dfb2d0 100644 --- a/meilisearch-http/tests/common/server.rs +++ b/meilisearch-http/tests/common/server.rs @@ -73,7 +73,7 @@ pub fn default_settings(dir: impl AsRef) -> Opt { env: "development".to_owned(), #[cfg(all(not(debug_assertions), feature = "analytics"))] no_analytics: true, - max_mdb_size: Byte::from_unit(4.0, ByteUnit::GiB).unwrap(), + max_index_size: Byte::from_unit(4.0, ByteUnit::GiB).unwrap(), max_udb_size: Byte::from_unit(4.0, ByteUnit::GiB).unwrap(), http_payload_size_limit: Byte::from_unit(10.0, ByteUnit::MiB).unwrap(), ssl_cert_path: None, From 76727455ca94985d1f88c2a4b7dbc052fb64bf73 Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 21 Jun 2021 18:13:00 +0200 Subject: [PATCH 3/3] ignore all the options related to the indexer --- meilisearch-http/src/option.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch-http/src/option.rs b/meilisearch-http/src/option.rs index d78bfd37e..8cf2e0aba 100644 --- a/meilisearch-http/src/option.rs +++ b/meilisearch-http/src/option.rs @@ -188,7 +188,7 @@ pub struct Opt { #[structopt(long, conflicts_with = "import-snapshot")] pub import_dump: Option, - #[structopt(flatten)] + #[structopt(skip)] pub indexer_options: IndexerOpts, }