From 445a6c9ea2fc4c39cf2f1ffad130c43703f80e22 Mon Sep 17 00:00:00 2001 From: mpostma Date: Fri, 21 Aug 2020 14:42:20 +0200 Subject: [PATCH 1/2] update options name --- meilisearch-http/src/option.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meilisearch-http/src/option.rs b/meilisearch-http/src/option.rs index 021890433..03645918b 100644 --- a/meilisearch-http/src/option.rs +++ b/meilisearch-http/src/option.rs @@ -49,12 +49,12 @@ pub struct Opt { pub no_analytics: bool, /// The maximum size, in bytes, of the main lmdb database directory - #[structopt(long, env = "MEILI_MAIN_MAP_SIZE", default_value = "107374182400")] // 100GB - pub main_map_size: usize, + #[structopt(long, env = "MEILI_MAX_MDB_SIZE", default_value = "107374182400")] // 100GB + pub max_mdb_size: usize, /// The maximum size, in bytes, of the update lmdb database directory - #[structopt(long, env = "MEILI_UPDATE_MAP_SIZE", default_value = "107374182400")] // 100GB - pub update_map_size: usize, + #[structopt(long, env = "MEILI_MAX_UDB_SIZE", default_value = "107374182400")] // 100GB + pub max_udb_size: usize, /// The maximum size, in bytes, of accepted JSON payloads #[structopt(long, env = "MEILI_HTTP_PAYLOAD_SIZE_LIMIT", default_value = "10485760")] // 10MB From 4ecaf99047803c008b9baabadcc9d1ebf7233bf2 Mon Sep 17 00:00:00 2001 From: mpostma Date: Mon, 24 Aug 2020 14:14:11 +0200 Subject: [PATCH 2/2] fix test option test --- meilisearch-http/src/data.rs | 4 ++-- meilisearch-http/tests/common.rs | 4 ++-- meilisearch-http/tests/index.rs | 1 - meilisearch-http/tests/index_update.rs | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/meilisearch-http/src/data.rs b/meilisearch-http/src/data.rs index f82f5649f..64d7bd488 100644 --- a/meilisearch-http/src/data.rs +++ b/meilisearch-http/src/data.rs @@ -60,8 +60,8 @@ impl Data { let server_pid = std::process::id(); let db_opt = DatabaseOptions { - main_map_size: opt.main_map_size, - update_map_size: opt.update_map_size, + main_map_size: opt.max_mdb_size, + update_map_size: opt.max_udb_size, }; let http_payload_size_limit = opt.http_payload_size_limit; diff --git a/meilisearch-http/tests/common.rs b/meilisearch-http/tests/common.rs index a8633bd0f..3c5550a00 100644 --- a/meilisearch-http/tests/common.rs +++ b/meilisearch-http/tests/common.rs @@ -44,8 +44,8 @@ impl Server { master_key: None, env: "development".to_owned(), no_analytics: true, - main_map_size: default_db_options.main_map_size, - update_map_size: default_db_options.update_map_size, + max_mdb_size: default_db_options.main_map_size, + max_udb_size: default_db_options.update_map_size, http_payload_size_limit: 10000000, ..Opt::default() }; diff --git a/meilisearch-http/tests/index.rs b/meilisearch-http/tests/index.rs index 6cca06898..136369146 100644 --- a/meilisearch-http/tests/index.rs +++ b/meilisearch-http/tests/index.rs @@ -1,6 +1,5 @@ use assert_json_diff::assert_json_eq; use serde_json::json; -use serde_json::Value; mod common; diff --git a/meilisearch-http/tests/index_update.rs b/meilisearch-http/tests/index_update.rs index 4b8248f9f..df4639252 100644 --- a/meilisearch-http/tests/index_update.rs +++ b/meilisearch-http/tests/index_update.rs @@ -1,4 +1,3 @@ -use assert_json_diff::assert_json_eq; use serde_json::json; use serde_json::Value; use assert_json_diff::assert_json_include;