From 28cc6df7a3589a64037b878dd56c742918c225bc Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 6 Jan 2025 18:07:49 +0100 Subject: [PATCH] Fix uselessly deep stack trace --- .../milli/src/update/facet/new_incremental.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/crates/milli/src/update/facet/new_incremental.rs b/crates/milli/src/update/facet/new_incremental.rs index 57358888e..9d8c19543 100644 --- a/crates/milli/src/update/facet/new_incremental.rs +++ b/crates/milli/src/update/facet/new_incremental.rs @@ -180,13 +180,16 @@ impl FacetsUpdateIncrementalInner { } } } - self.find_touched_parents( - wtxn, - parent_level, - touched_parents - // no need to `rev` here because the parents were already visited in reverse order - .into_iter(), - ) + if !touched_parents.is_empty() { + self.find_touched_parents( + wtxn, + parent_level, + touched_parents + // no need to `rev` here because the parents were already visited in reverse order + .into_iter(), + )?; + } + Ok(()) } fn compute_parent_group(