Skip to content

Commit 0889d38

Browse files
authored
Warming up terms and fastfields in concurrently. (#1147)
Closes #1144
1 parent 7610ce8 commit 0889d38

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quickwit-search/src/leaf.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,14 @@ pub(crate) async fn warmup(
127127
query: &dyn Query,
128128
fast_field_names: &HashSet<String>,
129129
) -> anyhow::Result<()> {
130-
warm_up_terms(searcher, query)
131-
.instrument(debug_span!("warm_up_terms"))
132-
.await?;
133-
warm_up_fastfields(searcher, fast_field_names)
134-
.instrument(debug_span!("warm_up_fastfields"))
135-
.await?;
130+
let warm_up_terms_future =
131+
warm_up_terms(searcher, query).instrument(debug_span!("warm_up_terms"));
132+
let warm_up_fastfields_future = warm_up_fastfields(searcher, fast_field_names)
133+
.instrument(debug_span!("warm_up_fastfields"));
134+
let (warm_up_terms_res, warm_up_fastfields_res) =
135+
tokio::join!(warm_up_terms_future, warm_up_fastfields_future);
136+
warm_up_terms_res?;
137+
warm_up_fastfields_res?;
136138
Ok(())
137139
}
138140

0 commit comments

Comments
 (0)