Skip to content

Commit 25a3fe4

Browse files
Merge pull request #1689 from rabbitmq/forgiving-binding-removal-on-queue-deletion
Don't error when a queue that's being deleted has no bindings left to remove on transaction retries
2 parents 46ca0db + 62b40f7 commit 25a3fe4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/rabbit_amqqueue.erl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,9 @@
178178
-spec notify_decorators(rabbit_types:amqqueue()) -> 'ok'.
179179
-spec resume(pid(), pid()) -> 'ok'.
180180
-spec internal_delete(name(), rabbit_types:username()) ->
181-
rabbit_types:ok_or_error('not_found') |
182-
rabbit_types:connection_exit() |
181+
'ok' | rabbit_types:connection_exit() |
183182
fun (() ->
184-
rabbit_types:ok_or_error('not_found') |
185-
rabbit_types:connection_exit()).
183+
'ok' | rabbit_types:connection_exit()).
186184
-spec run_backing_queue
187185
(pid(), atom(), (fun ((atom(), A) -> {[rabbit_types:msg_id()], A}))) ->
188186
'ok'.
@@ -995,7 +993,7 @@ internal_delete(QueueName, ActingUser, Reason) ->
995993
case {mnesia:wread({rabbit_queue, QueueName}),
996994
mnesia:wread({rabbit_durable_queue, QueueName})} of
997995
{[], []} ->
998-
rabbit_misc:const({error, not_found});
996+
rabbit_misc:const(ok);
999997
_ ->
1000998
Deletions = internal_delete1(QueueName, false, Reason),
1001999
T = rabbit_binding:process_deletions(Deletions,

0 commit comments

Comments
 (0)