Merge #5113
Some checks failed
Test suite / Tests on ${{ matrix.os }} (macos-13) (push) Waiting to run
Test suite / Tests almost all features (push) Has been skipped
Test suite / Test disabled tokenization (push) Has been skipped
Test suite / Tests on ${{ matrix.os }} (windows-2022) (push) Failing after 13s
Test suite / Tests on ubuntu-20.04 (push) Failing after 14s
Test suite / Run tests in debug (push) Failing after 15s
Test suite / Run Rustfmt (push) Successful in 3m0s
Test suite / Run Clippy (push) Successful in 13m30s

5113: Fix the Minimum BBQueue channel threshold r=Kerollmops a=Kerollmops



Co-authored-by: Kerollmops <clement@meilisearch.com>
This commit is contained in:
meili-bors[bot] 2024-12-04 11:09:39 +00:00 committed by GitHub
commit dec8df86e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,9 +86,9 @@ where
(grenad_parameters, 2 * minimum_capacity), // 100 MiB by thread by default (grenad_parameters, 2 * minimum_capacity), // 100 MiB by thread by default
|max_memory| { |max_memory| {
// 2% of the indexing memory // 2% of the indexing memory
let total_bbbuffer_capacity = (max_memory / 100 / 2).min(minimum_capacity); let total_bbbuffer_capacity = (max_memory / 100 / 2).max(minimum_capacity);
let new_grenad_parameters = GrenadParameters { let new_grenad_parameters = GrenadParameters {
max_memory: Some(max_memory - total_bbbuffer_capacity), max_memory: Some(max_memory.saturating_sub(total_bbbuffer_capacity)),
..grenad_parameters ..grenad_parameters
}; };
(new_grenad_parameters, total_bbbuffer_capacity) (new_grenad_parameters, total_bbbuffer_capacity)