Skip to content

Commit 249cf66

Browse files
committed
Do not GC channel-queue metrics on mirror migration
rabbitmq-server#1340 [#150442817]
1 parent b02a53e commit 249cf66

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/rabbit_core_metrics_gc.erl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ gc_channels() ->
7070
ok.
7171

7272
gc_queues() ->
73+
gc_local_queues(),
74+
gc_global_queues().
75+
76+
gc_local_queues() ->
7377
Queues = rabbit_amqqueue:list_local_names(),
7478
GbSet = gb_sets:from_list(Queues),
7579
gc_entity(queue_metrics, GbSet),
76-
gc_entity(queue_coarse_metrics, GbSet),
80+
gc_entity(queue_coarse_metrics, GbSet).
81+
82+
gc_global_queues() ->
83+
GbSet = gb_sets:from_list(rabbit_amqqueue:list_names()),
7784
gc_process_and_entity(channel_queue_metrics, GbSet),
7885
gc_process_and_entity(consumer_created, GbSet),
7986
ExchangeGbSet = gb_sets:from_list(rabbit_exchange:list_names()),

0 commit comments

Comments
 (0)