diff options
| author | Ben Hood <0x6e6562@gmail.com> | 2008-12-22 15:39:19 +0000 |
|---|---|---|
| committer | Ben Hood <0x6e6562@gmail.com> | 2008-12-22 15:39:19 +0000 |
| commit | 201c9d1ccfe9f97baed87f6eca80a0983d3c504d (patch) | |
| tree | 0439ba86d931a36608469ccee26ad0d67435f2c5 /src | |
| parent | b5987fc4f5faf7a96e8394ff2559945cbc76977d (diff) | |
| parent | 22ba885e4b68103baebb88ede8bcb0621e23420f (diff) | |
| download | rabbitmq-server-git-201c9d1ccfe9f97baed87f6eca80a0983d3c504d.tar.gz | |
Merged 20046 into default
Diffstat (limited to 'src')
| -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 299747d141..c8069e08ef 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, '_'); |
