summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordcorbacho <dparracorbacho@piotal.io>2020-09-25 11:39:03 +0100
committerdcorbacho <dparracorbacho@piotal.io>2020-09-25 11:39:03 +0100
commita9b2f209c95fa4ae2b50334a8f786072101cfa13 (patch)
tree44d90caa323886995b3a67bf6ef5fc4edeb29be6
parent17ef8504f878142c8756a15ef1a1fa072311a7ba (diff)
downloadrabbitmq-server-git-a9b2f209c95fa4ae2b50334a8f786072101cfa13.tar.gz
Shrink quorum queue must succeed if the target node is down or rabbit is stoppedshrink-when-down
Avoids false negatives when shrink gets included in forget_cluster_node command, as at least the rabbit app is down
-rw-r--r--src/rabbit_quorum_queue.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rabbit_quorum_queue.erl b/src/rabbit_quorum_queue.erl
index 33f8166da6..12c651eeb1 100644
--- a/src/rabbit_quorum_queue.erl
+++ b/src/rabbit_quorum_queue.erl
@@ -1000,6 +1000,11 @@ delete_member(Q, Node) when ?amqqueue_is_quorum(Q) ->
case ra:force_delete_server(ServerId) of
ok ->
ok;
+ {error, {badrpc, nodedown}} ->
+ ok;
+ {error, {badrpc, {'EXIT', {badarg, _}}}} ->
+ %% DETS/ETS tables can't be found, application isn't running
+ ok;
{error, _} = Err ->
Err;
Err ->
@@ -1007,6 +1012,8 @@ delete_member(Q, Node) when ?amqqueue_is_quorum(Q) ->
end;
{timeout, _} ->
{error, timeout};
+ {badrpc, nodedown} ->
+ ok;
E ->
E
end