From 13f870e993d22ac245ab95dec3001959746e76b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 15 May 2023 15:08:28 +0200 Subject: [PATCH] Fix typos and documentation issues --- index-scheduler/src/index_mapper/mod.rs | 2 +- index-scheduler/src/lib.rs | 3 ++- meilisearch/src/option.rs | 11 +---------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index 5160ebd63..2903a824f 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -66,7 +66,7 @@ pub struct IndexMapper { index_base_map_size: usize, /// The quantity by which the map size of an index is incremented upon reopening, in bytes. index_growth_amount: usize, - /// Weither we open a meilisearch index with the MDB_WRITEMAP option or not. + /// Whether we open a meilisearch index with the MDB_WRITEMAP option or not. enable_mdb_writemap: bool, pub indexer_config: Arc, } diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 607a4a407..c5eaf2735 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -233,7 +233,7 @@ pub struct IndexSchedulerOptions { pub task_db_size: usize, /// The size, in bytes, with which a meilisearch index is opened the first time of each meilisearch index. pub index_base_map_size: usize, - /// Weither we open a meilisearch index with the MDB_WRITEMAP option or not. + /// Whether we open a meilisearch index with the MDB_WRITEMAP option or not. pub enable_mdb_writemap: bool, /// The size, in bytes, by which the map size of an index is increased when it resized due to being full. pub index_growth_amount: usize, @@ -377,6 +377,7 @@ impl IndexScheduler { std::fs::create_dir_all(&options.dumps_path)?; if cfg!(windows) && options.enable_mdb_writemap { + // programmer error if this happens: in normal use passing the option on Windows is an error in main panic!("Windows doesn't support the MDB_WRITEMAP LMDB option"); } diff --git a/meilisearch/src/option.rs b/meilisearch/src/option.rs index 83fbeb333..0511b5033 100644 --- a/meilisearch/src/option.rs +++ b/meilisearch/src/option.rs @@ -295,16 +295,7 @@ pub struct Opt { #[serde(default)] pub experimental_enable_metrics: bool, - /// Experimentally reduces the amount of RAM used by the engine when indexing documents. - /// - /// You must not use this flag in production. It is experimental and can corrupt the database - /// or be removed in future versions. It can also be stabilized or directly integrated - /// into the engine later. - /// - /// This flag enables the MDB_WRITEMAP option of LMDB, making the internal key-value store - /// use much less RAM than usual. Unfortunately, it can reduce the write speed of it and therefore - /// slow down the engine. You can read more and tell us about your experience on the dedicated - /// discussion: . + /// Experimental RAM reduction during indexing, do not use in production, see: #[clap(long, env = MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE)] #[serde(default)] pub experimental_reduce_indexing_memory_usage: bool,