summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2016-10-04 16:53:01 +0300
committerMichael Klishin <michael@clojurewerkz.org>2016-10-04 16:53:01 +0300
commitd9cb0050d82a85d4f9a2ea72f28143c2946b798a (patch)
tree739fec9bde4632316171fe01e2079623db249d4c
parenta2ad24faedc32eaca771db0f6a75a1a5282b311c (diff)
downloadrabbitmq-server-git-d9cb0050d82a85d4f9a2ea72f28143c2946b798a.tar.gz
Drive-by change: reduce log noise
Don't log connection tracking table creation failures where the error is "the table already exists".
-rw-r--r--src/rabbit_connection_tracking.erl13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/rabbit_connection_tracking.erl b/src/rabbit_connection_tracking.erl
index 9fd3244979..460bf964a0 100644
--- a/src/rabbit_connection_tracking.erl
+++ b/src/rabbit_connection_tracking.erl
@@ -80,8 +80,9 @@ ensure_tracked_connections_table_for_node(Node) ->
TableName = tracked_connection_table_name_for(Node),
case mnesia:create_table(TableName, [{record_name, tracked_connection},
{attributes, record_info(fields, tracked_connection)}]) of
- {atomic, ok} -> ok;
- {aborted, Error} ->
+ {atomic, ok} -> ok;
+ {aborted, {already_exists, _}} -> ok;
+ {aborted, Error} ->
rabbit_log:error("Failed to create a tracked connection table for node ~p: ~p", [Node, Error]),
ok
end.
@@ -93,9 +94,11 @@ ensure_per_vhost_tracked_connections_table_for_node(Node) ->
TableName = tracked_connection_per_vhost_table_name_for(Node),
case mnesia:create_table(TableName, [{record_name, tracked_connection_per_vhost},
{attributes, record_info(fields, tracked_connection_per_vhost)}]) of
- {atomic, ok} -> ok;
- {aborted, _} -> ok
- %% TODO: propagate errors
+ {atomic, ok} -> ok;
+ {aborted, {already_exists, _}} -> ok;
+ {aborted, Error} ->
+ rabbit_log:error("Failed to create a per-vhost tracked connection table for node ~p: ~p", [Node, Error]),
+ ok
end.