diff --git a/src/aggregation/bucket/term_agg.rs b/src/aggregation/bucket/term_agg.rs index 79db14c971..66db88f61e 100644 --- a/src/aggregation/bucket/term_agg.rs +++ b/src/aggregation/bucket/term_agg.rs @@ -1269,6 +1269,7 @@ mod tests { ]; let index = get_test_index_from_terms(false, &terms_per_segment)?; + assert_eq!(index.searchable_segments().unwrap().len(), 2); let agg_req: Aggregations = serde_json::from_value(json!({ "my_texts": { diff --git a/src/collector/tests.rs b/src/collector/tests.rs index b545413531..702657e779 100644 --- a/src/collector/tests.rs +++ b/src/collector/tests.rs @@ -26,7 +26,7 @@ pub fn test_filter_collector() -> crate::Result<()> { let schema = schema_builder.build(); let index = Index::create_in_ram(schema); - let mut index_writer = index.writer_with_num_threads(1, 10_000_000)?; + let mut index_writer = index.writer_with_num_threads(1, 20_000_000)?; index_writer.add_document(doc!(title => "The Name of the Wind", price => 30_200u64, date => DateTime::from_utc(OffsetDateTime::parse("1898-04-09T00:00:00+00:00", &Rfc3339).unwrap())))?; index_writer.add_document(doc!(title => "The Diary of Muadib", price => 29_240u64, date => DateTime::from_utc(OffsetDateTime::parse("2020-04-09T00:00:00+00:00", &Rfc3339).unwrap())))?; index_writer.add_document(doc!(title => "The Diary of Anne Frank", price => 18_240u64, date => DateTime::from_utc(OffsetDateTime::parse("2019-04-20T00:00:00+00:00", &Rfc3339).unwrap())))?; diff --git a/stacker/src/arena_hashmap.rs b/stacker/src/arena_hashmap.rs index 254be2de3d..931ae613b7 100644 --- a/stacker/src/arena_hashmap.rs +++ b/stacker/src/arena_hashmap.rs @@ -164,7 +164,7 @@ impl ArenaHashMap { #[inline] pub fn mem_usage(&self) -> usize { - self.table.len() * mem::size_of::() + self.table.len() * mem::size_of::() + self.memory_arena.mem_usage() } #[inline]