diff --git a/src/runtime.rs b/src/runtime.rs index d8e2da66..b6350020 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -337,9 +337,9 @@ impl Runtime { // form again. cycle_query.remove_cycle_participants(&cycle); - // Mark the cycle participants so they know to recover. - // This only matters for queries that have a fallback value specified; - // the others will just unwind without storing any recovery information. + // Mark each cycle participant that has recovery set, along with + // any frames that come after them on the same thread. Those frames + // are going to be unwound so that fallback can occur. dg.for_each_cycle_participant(from_id, &mut from_stack, database_key_index, to_id, |aqs| { aqs.iter_mut() .skip_while( diff --git a/src/runtime/dependency_graph.rs b/src/runtime/dependency_graph.rs index 462cdd3b..1e2c6471 100644 --- a/src/runtime/dependency_graph.rs +++ b/src/runtime/dependency_graph.rs @@ -121,14 +121,12 @@ impl DependencyGraph { closure(&mut from_stack[prefix..]); } - /// For each runtime that is blocked as part of this cycle excluding the current one, - /// execute `should_unblock` with its portion of the stack. If that function returns true, - /// then unblocks the given edge. The function is also invoked on the current runtime, - /// but in that case the return value (true or false) is simply returned directly as part - /// of the return tuple, since it is up to the caller to "unblock" or "block". + /// Unblock each blocked runtime (excluding the current one) if some + /// query executing in that runtime is participating in cycle fallback. /// /// Returns a boolean (Current, Others) where: - /// * Current is true if the current runtime should be unblocked and + /// * Current is true if the current runtime has cycle participants + /// with fallback; /// * Others is true if other runtimes were unblocked. pub(super) fn maybe_unblock_runtimes_in_cycle( &mut self,