Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions deps/rabbit/src/rabbit_amqqueue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,19 @@
}}).

are_transient_nonexcl_used(_) ->
case rabbit_db_queue:list_transient() of
{ok, Queues} ->
NonExclQueues = [Q || Q <- Queues, not is_exclusive(Q)],
length(NonExclQueues) > 0;
{error, _} ->
undefined
case rabbit_db:is_virgin_node() of
true ->
%% a virgin node can't have any queues and the check is performed before
%% metadata store is ready, so skip the query
false;
false ->
case rabbit_db_queue:list_transient() of
{ok, Queues} ->
NonExclQueues = [Q || Q <- Queues, not is_exclusive(Q)],
length(NonExclQueues) > 0;
{error, _} ->
undefined
end
end.

-define(CONSUMER_INFO_KEYS,
Expand Down
2 changes: 1 addition & 1 deletion deps/rabbit/src/rabbit_db_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ list_transient() ->
}).

list_transient_in_mnesia() ->
Pattern = amqqueue:pattern_match_all(),
Pattern = amqqueue:pattern_match_on_durable(false),
AllQueues = mnesia:dirty_match_object(
?MNESIA_TABLE,
Pattern),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ defmodule RabbitMQ.CLI.Diagnostics.Commands.CheckCertificateExpirationCommand do
end

def unit_label(1, unit) do
unit |> String.slice(0..-2)
unit |> String.slice(0..-2//-1)
end

def unit_label(_within, unit) do
Expand Down
Loading