Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 0240c02

Browse files
Merge pull request #355 from Ayanda-D/handle-absent-alive-queues
Handle and raise protocol error for absent queues assumed to be alive
2 parents b70710a + f6a65ed commit 0240c02

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rabbit_misc.erl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,12 @@ absent(#amqqueue{name = QueueName}, crashed) ->
327327

328328
absent(#amqqueue{name = QueueName}, timeout) ->
329329
protocol_error(not_found,
330-
"failed to perform operation on ~s due to timeout", [rs(QueueName)]).
330+
"failed to perform operation on ~s due to timeout", [rs(QueueName)]);
331+
332+
absent(#amqqueue{name = QueueName, pid = QPid}, alive) ->
333+
protocol_error(not_found,
334+
"failed to perform operation on ~s: its master replica ~w may be stopping or being demoted",
335+
[rs(QueueName), QPid]).
331336

332337
type_class(byte) -> int;
333338
type_class(short) -> int;

0 commit comments

Comments
 (0)