diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2016-08-10 18:37:06 +0300 |
|---|---|---|
| committer | Michael Klishin <mklishin@pivotal.io> | 2016-08-10 18:37:06 +0300 |
| commit | efc0f993e1e66b724f22be77bbc1d3830b2ddcdb (patch) | |
| tree | a3b72c9596ef9f8aa63a1d6d24549c7b9687eb4d | |
| parent | f012c49c5df5f2c7bbb2aa2d7a2f61e81da1863a (diff) | |
| download | rabbitmq-server-git-efc0f993e1e66b724f22be77bbc1d3830b2ddcdb.tar.gz | |
We can use record_info/2 here; log errors in table creation
| -rw-r--r-- | src/rabbit_connection_tracking.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rabbit_connection_tracking.erl b/src/rabbit_connection_tracking.erl index 2d23e7c888..fe5392a8a0 100644 --- a/src/rabbit_connection_tracking.erl +++ b/src/rabbit_connection_tracking.erl @@ -78,13 +78,11 @@ ensure_per_vhost_tracked_connections_table_for_this_node() -> ensure_tracked_connections_table_for_node(Node) -> TableName = tracked_connection_table_name_for(Node), case mnesia:create_table(TableName, [{record_name, tracked_connection}, - {attributes, [id, node, vhost, name, - pid, protocol, - peer_host, peer_port, - username, connected_at]}]) of - {atomic, ok} -> ok; - {aborted, _} -> ok - %% TODO: propagate errors + {attributes, record_info(fields, tracked_connection)}]) of + {atomic, ok} -> ok; + {aborted, Error} -> + rabbit_log:error("Failed to create a tracked connection table for node ~p: ~p", [Node, Error]), + ok end. |
