Don't panic when waiting on poisoned queries

This commit is contained in:
John Kåre Alsaker 2023-08-16 17:50:40 +02:00
parent 5257aee7dd
commit dd0004a129

View File

@ -285,9 +285,8 @@ fn wait_for_query<Q, Qcx>(
let lock = query.query_state(qcx).active.get_shard_by_value(&key).lock();
match lock.get(&key) {
Some(QueryResult::Poisoned) => {
panic!("query '{}' not cached due to poisoning", query.name())
}
// The query we waited on panicked. Continue unwinding here.
Some(QueryResult::Poisoned) => FatalError.raise(),
_ => panic!(
"query '{}' result must be in the cache or the query must be poisoned after a wait",
query.name()