From 201fea0fdaae3a334936a8ad52e2c5de8f178a84 Mon Sep 17 00:00:00 2001 From: ad hoc Date: Tue, 5 Apr 2022 14:14:15 +0200 Subject: [PATCH] limit extract_word_docids memory usage --- milli/src/update/delete_documents.rs | 1 + .../src/update/index_documents/extract/extract_word_docids.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/milli/src/update/delete_documents.rs b/milli/src/update/delete_documents.rs index b347aae38..77c32f0fb 100644 --- a/milli/src/update/delete_documents.rs +++ b/milli/src/update/delete_documents.rs @@ -502,6 +502,7 @@ fn remove_from_word_docids( } } } + Ok(()) } diff --git a/milli/src/update/index_documents/extract/extract_word_docids.rs b/milli/src/update/index_documents/extract/extract_word_docids.rs index 0f8b4c039..f3a44162b 100644 --- a/milli/src/update/index_documents/extract/extract_word_docids.rs +++ b/milli/src/update/index_documents/extract/extract_word_docids.rs @@ -34,7 +34,7 @@ pub fn extract_word_docids( indexer.chunk_compression_type, indexer.chunk_compression_level, indexer.max_nb_chunks, - max_memory, + max_memory.map(|x| x / 2), ); let mut exact_word_docids_sorter = create_sorter( @@ -42,7 +42,7 @@ pub fn extract_word_docids( indexer.chunk_compression_type, indexer.chunk_compression_level, indexer.max_nb_chunks, - max_memory, + max_memory.map(|x| x / 2), ); let mut value_buffer = Vec::new();