Skip to content

Commit 7c1a7cf

Browse files
Merge pull request #8747 from rabbitmq/rabbitmq-server-8595-followup-vesc-1076
Fix combination of `amqqueue:get_pid/1` and `node/1`
2 parents cab06cd + 8dfcc9c commit 7c1a7cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deps/rabbit/src/rabbit_classic_queue.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ delete(Q, IfUnused, IfEmpty, ActingUser) when ?amqqueue_is_classic(Q) ->
121121
{ok, 0}
122122
end.
123123

124-
is_recoverable(Q) when ?is_amqqueue(Q) ->
124+
is_recoverable(Q) when ?is_amqqueue(Q) and ?amqqueue_is_classic(Q) ->
125125
Node = node(),
126-
Node =:= node(amqqueue:get_pid(Q)) andalso
126+
Node =:= amqqueue:qnode(Q) andalso
127127
%% Terminations on node down will not remove the rabbit_queue
128128
%% record if it is a mirrored queue (such info is now obtained from
129129
%% the policy). Thus, we must check if the local pid is alive

deps/rabbit/src/rabbit_quorum_queue.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ reductions(Name) ->
554554
0
555555
end.
556556

557-
is_recoverable(Q) ->
557+
is_recoverable(Q) when ?is_amqqueue(Q) and ?amqqueue_is_quorum(Q) ->
558558
Node = node(),
559559
Nodes = get_nodes(Q),
560560
lists:member(Node, Nodes).

0 commit comments

Comments
 (0)