diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2016-10-04 16:53:01 +0300 |
|---|---|---|
| committer | Michael Klishin <mklishin@pivotal.io> | 2016-10-04 17:04:02 +0300 |
| commit | 41bfe8f020f62871f02f41e236d6458ef969d9f2 (patch) | |
| tree | 3d3d2b725147c2dabca4ab8367602be7a352ad7f | |
| parent | a980106a85afd40b9f773feba1d2a0ef626655ef (diff) | |
| download | rabbitmq-server-git-41bfe8f020f62871f02f41e236d6458ef969d9f2.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.erl | 13 |
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. |
