Compare commits

..

2 Commits

Author SHA1 Message Date
Kerollmops
353b26091e Remove a log that would log too much 2025-01-28 17:41:37 +01:00
Kerollmops
ece46b1941 Refine the env variable and the max readers 2025-01-28 17:40:50 +01:00
2 changed files with 6 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
use std::collections::BTreeMap;
use std::env::VarError;
use std::path::Path;
use std::str::FromStr;
use std::time::Duration;
use meilisearch_types::heed::{EnvClosingEvent, EnvFlags, EnvOpenOptions};
@@ -301,17 +302,15 @@ fn create_or_open_index(
enable_mdb_writemap: bool,
map_size: usize,
) -> Result<Index> {
use std::str::FromStr;
let mut options = EnvOpenOptions::new();
options.map_size(clamp_to_page_size(map_size));
let max_readers = match std::env::var("MEILI_INDEX_MAX_READERS") {
let max_readers = match std::env::var("MEILI_EXPERIMENTAL_INDEX_MAX_READERS") {
Ok(value) => u32::from_str(&value).unwrap(),
Err(VarError::NotPresent) => 100 * 1024,
Err(VarError::NotUnicode(value)) => {
panic!("Invalid unicode for the `MEILI_INDEX_MAX_READERS` env var: {value:?}")
}
Err(VarError::NotPresent) => 1024,
Err(VarError::NotUnicode(value)) => panic!(
"Invalid unicode for the `MEILI_EXPERIMENTAL_INDEX_MAX_READERS` env var: {value:?}"
),
};
options.max_readers(max_readers);
if enable_mdb_writemap {

View File

@@ -637,7 +637,6 @@ impl Embedder {
}
}
#[tracing::instrument(level = "debug", skip_all, target = "indexing::vector")]
pub fn embed_chunks_ref(
&self,
texts: &[&str],