diff options
author | Ben Hood <0x6e6562@gmail.com> | 2008-12-23 14:42:38 +0000 |
---|---|---|
committer | Ben Hood <0x6e6562@gmail.com> | 2008-12-23 14:42:38 +0000 |
commit | cf1272653c67dd02824a416999f6cfb1891f829c (patch) | |
tree | 4a7fcfd5ac8a90b8ff96960b433ed7ded6cea985 | |
parent | 050477dcc9ad48f238edf238240a837a38a6ad46 (diff) | |
parent | 9a607fc177f013e2f69935c973db0bb9470c5a61 (diff) | |
download | rabbitmq-server-cf1272653c67dd02824a416999f6cfb1891f829c.tar.gz |
Merged 2nd fix of 20047 into default
-rw-r--r-- | src/rabbit_exchange.erl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl index 299747d1..c8069e08 100644 --- a/src/rabbit_exchange.erl +++ b/src/rabbit_exchange.erl @@ -238,7 +238,19 @@ route(#exchange{name = Name, type = topic}, RoutingKey) -> %% TODO: This causes a full scan for each entry %% with the same exchange (see bug 19336) topic_matches(BindingKey, RoutingKey)]), - lookup_qpids(mnesia:async_dirty(fun qlc:e/1, [Query])); + lookup_qpids( + try + mnesia:async_dirty(fun qlc:e/1, [Query]) + catch exit:{aborted, {badarg, _}} -> + %% work around OTP-7025, which was fixed in R12B-1, by + %% falling back on a less efficient method + [QName || #route{binding = #binding{queue_name = QName, + key = BindingKey}} <- + mnesia:dirty_match_object( + #route{binding = #binding{exchange_name = Name, + _ = '_'}}), + topic_matches(BindingKey, RoutingKey)] + end); route(X = #exchange{type = fanout}, _) -> route_internal(X, '_'); |