summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kuratczyk <mkuratczyk@vmware.com>2021-11-03 11:26:15 +0100
committerMichal Kuratczyk <mkuratczyk@vmware.com>2021-11-03 11:26:15 +0100
commit3f8925954cf33c5a9bcab8723b4f1a97c1730d2d (patch)
tree443e1e3ee948e2838c690e3eb1c6b7d071f2201e
parent5dd8c7fe4dc3a71943fa70471492efa82bfb4b4d (diff)
downloadrabbitmq-server-git-3f8925954cf33c5a9bcab8723b4f1a97c1730d2d.tar.gz
Turn down logging from queue rebalancing
With many queues, rebalancing can log hundreds of lines at warning/info level, even though nothing exciting happened. I think we can tune that down - if there is nothing to do - that's a debug level, if things go well - that's info, not a warning.
-rw-r--r--deps/rabbit/src/rabbit_amqqueue.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/deps/rabbit/src/rabbit_amqqueue.erl b/deps/rabbit/src/rabbit_amqqueue.erl
index 1706ca434c..96db3bac07 100644
--- a/deps/rabbit/src/rabbit_amqqueue.erl
+++ b/deps/rabbit/src/rabbit_amqqueue.erl
@@ -511,11 +511,11 @@ maybe_migrate(ByNode, MaxQueuesDesired, [N | Nodes]) ->
{not_migrated, update_not_migrated_queue(N, Queue, Queues, ByNode)};
_ ->
[{Length, Destination} | _] = sort_by_number_of_queues(Candidates, ByNode),
- rabbit_log:warning("Migrating queue ~p from node ~p with ~p queues to node ~p with ~p queues",
+ rabbit_log:info("Migrating queue ~p from node ~p with ~p queues to node ~p with ~p queues",
[Name, N, length(All), Destination, Length]),
case Module:transfer_leadership(Q, Destination) of
{migrated, NewNode} ->
- rabbit_log:warning("Queue ~p migrated to ~p", [Name, NewNode]),
+ rabbit_log:info("Queue ~p migrated to ~p", [Name, NewNode]),
{migrated, update_migrated_queue(Destination, N, Queue, Queues, ByNode)};
{not_migrated, Reason} ->
rabbit_log:warning("Error migrating queue ~p: ~p", [Name, Reason]),
@@ -527,7 +527,7 @@ maybe_migrate(ByNode, MaxQueuesDesired, [N | Nodes]) ->
"Do nothing", [N, length(All)]),
maybe_migrate(ByNode, MaxQueuesDesired, Nodes);
All ->
- rabbit_log:warning("Node ~p only contains ~p queues, do nothing",
+ rabbit_log:debug("Node ~p only contains ~p queues, do nothing",
[N, length(All)]),
maybe_migrate(ByNode, MaxQueuesDesired, Nodes)
end.