diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-11-12 16:06:02 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-11-12 16:06:02 +0000 |
commit | bdf4ff4178502d7e558067d3721ec8cb1ec1dd78 (patch) | |
tree | 12b2bfab2cd5cdd07efbbd9a010d5c8ce4301ad3 | |
parent | 54483ee88d6516caa56ced399e5a8cea7a72a1e3 (diff) | |
parent | 0d9918a1b3cb6efbe233b0302508203620f3c608 (diff) | |
download | rabbitmq-server-bdf4ff4178502d7e558067d3721ec8cb1ec1dd78.tar.gz |
Merge bug24781
-rw-r--r-- | src/rabbit_amqqueue.erl | 6 | ||||
-rw-r--r-- | src/rabbit_binding.erl | 5 | ||||
-rw-r--r-- | src/rabbit_diagnostics.erl | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 68e96742..2e5a5e8c 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -726,8 +726,10 @@ forget_all_durable(Node) -> forget_node_for_queue(#amqqueue{name = Name, down_slave_nodes = []}) -> - %% No slaves to recover from, queue is gone - rabbit_binding:process_deletions(internal_delete1(Name, true)); + %% No slaves to recover from, queue is gone. + %% Don't process_deletions since that just calls callbacks and we + %% are not really up. + internal_delete1(Name, true); forget_node_for_queue(Q = #amqqueue{down_slave_nodes = [H|T]}) -> %% Promote a slave while down - it'll happily recover as a master diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index 12d4df99..53af2f20 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -469,7 +469,10 @@ group_bindings_fold(Fun, SrcName, Acc, Removed, Bindings, OnlyDurable) -> maybe_auto_delete(XName, Bindings, Deletions, OnlyDurable) -> {Entry, Deletions1} = - case mnesia:read({rabbit_exchange, XName}) of + case mnesia:read({case OnlyDurable of + true -> rabbit_durable_exchange; + false -> rabbit_exchange + end, XName}) of [] -> {{undefined, not_deleted, Bindings}, Deletions}; [X] -> case rabbit_exchange:maybe_auto_delete(X, OnlyDurable) of not_deleted -> diff --git a/src/rabbit_diagnostics.erl b/src/rabbit_diagnostics.erl index 4eafada3..bf45b757 100644 --- a/src/rabbit_diagnostics.erl +++ b/src/rabbit_diagnostics.erl @@ -41,13 +41,13 @@ maybe_stuck(Pids, Timeout) -> maybe_stuck(Pids2, Timeout - 500). looks_stuck(Pid) -> - case process_info(Pid, status) of + case catch process_info(Pid, status) of {status, waiting} -> %% It's tempting to just check for message_queue_len > 0 %% here rather than mess around with stack traces and %% heuristics. But really, sometimes freshly stuck %% processes can have 0 messages... - case erlang:process_info(Pid, current_stacktrace) of + case catch erlang:process_info(Pid, current_stacktrace) of {current_stacktrace, [H|_]} -> maybe_stuck_stacktrace(H); _ -> |