Skip to content

Commit

Permalink
Remove a few remaining mentions of global prefetch
Browse files Browse the repository at this point in the history
As suggested in #12454.
  • Loading branch information
michaelklishin committed Oct 5, 2024
1 parent a15e1bf commit 65d0977
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
3 changes: 0 additions & 3 deletions deps/rabbit/src/rabbit_channel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@
acks_uncommitted,
pending_raft_commands,
prefetch_count,
global_prefetch_count,
state,
garbage_collection]).

Expand Down Expand Up @@ -2272,8 +2271,6 @@ i(pending_raft_commands, #ch{queue_states = QS}) ->
i(state, #ch{cfg = #conf{state = running}}) -> credit_flow:state();
i(state, #ch{cfg = #conf{state = State}}) -> State;
i(prefetch_count, #ch{cfg = #conf{consumer_prefetch = C}}) -> C;
i(global_prefetch_count, #ch{limiter = Limiter}) ->
rabbit_limiter:get_prefetch_limit(Limiter);
i(interceptors, #ch{interceptor_state = IState}) ->
IState;
i(garbage_collection, _State) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.ListChannelsCommand do
@info_keys ~w(pid connection name number user vhost transactional
confirm consumer_count messages_unacknowledged
messages_uncommitted acks_uncommitted messages_unconfirmed
prefetch_count global_prefetch_count)a
prefetch_count)a

def info_keys(), do: @info_keys

Expand Down
4 changes: 0 additions & 4 deletions deps/rabbitmq_management/priv/www/js/tmpl/channel.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
<th>Prefetch count</th>
<td><%= channel.prefetch_count %></td>
</tr>
<tr>
<th>Global prefetch count</th>
<td><%= channel.global_prefetch_count %></td>
</tr>
</table>

<table class="facts">
Expand Down
3 changes: 0 additions & 3 deletions deps/rabbitmq_management/priv/www/js/tmpl/channels-list.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@
<% if (channel.prefetch_count != 0) { %>
<%= channel.prefetch_count %><br/>
<% } %>
<% if (channel.global_prefetch_count != 0) { %>
<%= channel.global_prefetch_count %> (global)
<% } %>
</td>
<% } %>
<% if (show_column('channels', 'msgs-unacked')) { %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@
{2, undefined, channel_messages_unconfirmed, gauge, "Published but not yet confirmed messages", messages_unconfirmed},
{2, undefined, channel_messages_uncommitted, gauge, "Messages received in a transaction but not yet committed", messages_uncommitted},
{2, undefined, channel_acks_uncommitted, gauge, "Message acknowledgements in a transaction not yet committed", acks_uncommitted},
{2, undefined, consumer_prefetch, gauge, "Limit of unacknowledged messages for each consumer", prefetch_count},
{2, undefined, channel_prefetch, gauge, "Total limit of unacknowledged messages for all consumers on a channel", global_prefetch_count}
{2, undefined, consumer_prefetch, gauge, "Limit of unacknowledged messages for each consumer", prefetch_count}
]},

{channel_exchange_metrics, [
Expand Down Expand Up @@ -564,20 +563,18 @@ get_data(connection_metrics = Table, false, _) ->
end, empty(Table), Table),
[{Table, [{recv_cnt, A1}, {send_cnt, A2}, {send_pend, A3}, {channels, A4}]}];
get_data(channel_metrics = Table, false, _) ->
{Table, A1, A2, A3, A4, A5, A6, A7} =
ets:foldl(fun({_, Props}, {T, A1, A2, A3, A4, A5, A6, A7}) ->
{Table, A1, A2, A3, A4, A5, A6} =
ets:foldl(fun({_, Props}, {T, A1, A2, A3, A4, A5, A6}) ->
{T,
sum(proplists:get_value(consumer_count, Props), A1),
sum(proplists:get_value(messages_unacknowledged, Props), A2),
sum(proplists:get_value(messages_unconfirmed, Props), A3),
sum(proplists:get_value(messages_uncommitted, Props), A4),
sum(proplists:get_value(acks_uncommitted, Props), A5),
sum(proplists:get_value(prefetch_count, Props), A6),
sum(proplists:get_value(global_prefetch_count, Props), A7)}
sum(proplists:get_value(prefetch_count, Props), A6)}
end, empty(Table), Table),
[{Table, [{consumer_count, A1}, {messages_unacknowledged, A2}, {messages_unconfirmed, A3},
{messages_uncommitted, A4}, {acks_uncommitted, A5}, {prefetch_count, A6},
{global_prefetch_count, A7}]}];
{messages_uncommitted, A4}, {acks_uncommitted, A5}, {prefetch_count, A6}]}];
get_data(queue_consumer_count = MF, false, VHostsFilter) ->
Table = queue_metrics, %% Real table name
{_, A1} = ets:foldl(fun
Expand Down

0 comments on commit 65d0977

Please sign in to comment.