Skip to content

Commit

Permalink
removed extra metrics table
Browse files Browse the repository at this point in the history
  • Loading branch information
markus812498 committed Dec 1, 2023
1 parent 8861a7a commit 8611635
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion deps/rabbitmq_stream/include/rabbit_stream_metrics.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

-define(TABLE_CONSUMER, rabbit_stream_consumer_created).
-define(TABLE_PUBLISHER, rabbit_stream_publisher_created).
-define(TABLE_CONSUMER_METRIC, stream_consumer_metrics).

-define(STREAM_DOES_NOT_EXIST, ?NUM_PROTOCOL_COUNTERS + 1).
-define(SUBSCRIPTION_ID_ALREADY_EXISTS, ?NUM_PROTOCOL_COUNTERS + 2).
Expand Down
9 changes: 1 addition & 8 deletions deps/rabbitmq_stream/src/rabbit_stream_metrics.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@

init() ->
_ = rabbit_core_metrics:create_table({?TABLE_CONSUMER, set}),
_ = rabbit_core_metrics:create_table({?TABLE_PUBLISHER, set}),
_ = rabbit_core_metrics:create_table({?TABLE_CONSUMER_METRIC, set}),
_ = rabbit_core_metrics:create_table({?TABLE_PUBLISHER, set})
ok.

consumer_created(Connection,
Expand All @@ -55,8 +54,6 @@ consumer_created(Connection,
{properties, Properties}],
ets:insert(?TABLE_CONSUMER,
{{StreamResource, Connection, SubscriptionId}, Values}),
ets:insert(?TABLE_CONSUMER_METRIC,
{Connection, Values}),
rabbit_global_counters:consumer_created(stream),
rabbit_core_metrics:consumer_created(Connection,
consumer_tag(SubscriptionId),
Expand Down Expand Up @@ -94,8 +91,6 @@ consumer_updated(Connection,
{properties, Properties}],
ets:insert(?TABLE_CONSUMER,
{{StreamResource, Connection, SubscriptionId}, Values}),
ets:insert(?TABLE_CONSUMER_METRIC,
{Connection, Values}),
rabbit_core_metrics:consumer_updated(Connection,
consumer_tag(SubscriptionId),
false,
Expand All @@ -112,8 +107,6 @@ consumer_updated(Connection,
consumer_cancelled(Connection, StreamResource, SubscriptionId) ->
ets:delete(?TABLE_CONSUMER,
{StreamResource, Connection, SubscriptionId}),
ets:delete(?TABLE_CONSUMER_METRIC,
{{Connection}}),
rabbit_global_counters:consumer_deleted(stream),
rabbit_core_metrics:consumer_deleted(Connection,
consumer_tag(SubscriptionId),
Expand Down

0 comments on commit 8611635

Please sign in to comment.