summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Bakken <lbakken@pivotal.io>2019-07-01 10:08:49 -0700
committerLuke Bakken <lbakken@pivotal.io>2019-07-01 10:08:49 -0700
commit7ed0211621bc100b7a6c04a17dbcb3edce1b1b69 (patch)
treecad46b3c6dc145bc10b821e5d7263169e76b403a /src
parent580896422de202857ab039e64c0cc7fcd5916c9c (diff)
downloadrabbitmq-server-git-7ed0211621bc100b7a6c04a17dbcb3edce1b1b69.tar.gz
Remove deprecation of force_event_refresh message
Part of rabbitmq/rabbitmq-management-agent#81 Also see rabbitmq/rabbitmq-management-agent#58
Diffstat (limited to 'src')
-rw-r--r--src/rabbit.erl17
-rw-r--r--src/rabbit_amqqueue.erl5
-rw-r--r--src/rabbit_amqqueue_process.erl3
-rw-r--r--src/rabbit_channel.erl8
-rw-r--r--src/rabbit_reader.erl5
5 files changed, 22 insertions, 16 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index d65c4ef24b..fdf2138515 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -33,8 +33,6 @@
-export([log_locations/0, config_files/0, decrypt_config/2]). %% for testing and mgmt-agent
-export([is_booted/1, is_booted/0, is_booting/1, is_booting/0]).
--deprecated([{force_event_refresh, 1, eventually}]).
-
-ifdef(TEST).
-export([start_logger/0]).
@@ -1123,17 +1121,16 @@ start_logger() ->
log_locations() ->
rabbit_lager:log_locations().
-%% This feature was used by the management API up-to and including
-%% RabbitMQ 3.7.x. It is unused in 3.8.x and thus deprecated. We keep it
-%% to support in-place upgrades to 3.8.x (i.e. mixed-version clusters).
-
-spec force_event_refresh(reference()) -> 'ok'.
+% Note: https://www.pivotaltracker.com/story/show/166962656
+% This event is necessary for the stats timer to be initialized with
+% the correct values once the management agent has started
force_event_refresh(Ref) ->
- rabbit_direct:force_event_refresh(Ref),
- rabbit_networking:force_connection_event_refresh(Ref),
- rabbit_channel:force_event_refresh(Ref),
- rabbit_amqqueue:force_event_refresh(Ref).
+ ok = rabbit_direct:force_event_refresh(Ref),
+ ok = rabbit_networking:force_connection_event_refresh(Ref),
+ ok = rabbit_channel:force_event_refresh(Ref),
+ ok = rabbit_amqqueue:force_event_refresh(Ref).
%%---------------------------------------------------------------------------
%% misc
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 85c647ae8c..9922a3f105 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -51,8 +51,6 @@
-export([pid_of/1, pid_of/2]).
-export([mark_local_durable_queues_stopped/1]).
--deprecated([{force_event_refresh, 1, eventually}]).
-
%% internal
-export([internal_declare/2, internal_delete/2, run_backing_queue/3,
set_ram_duration_target/2, set_maximum_since_use/2,
@@ -1031,6 +1029,9 @@ list_local(VHostPath) ->
-spec force_event_refresh(reference()) -> 'ok'.
+% Note: https://www.pivotaltracker.com/story/show/166962656
+% This event is necessary for the stats timer to be initialized with
+% the correct values once the management agent has started
force_event_refresh(Ref) ->
[gen_server2:cast(amqqueue:get_pid(Q),
{force_event_refresh, Ref}) || Q <- list()],
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 2185d7c95f..46db98ba5a 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -1615,6 +1615,9 @@ handle_cast({credit, ChPid, CTag, Credit, Drain},
run_message_queue(true, State1)
end);
+% Note: https://www.pivotaltracker.com/story/show/166962656
+% This event is necessary for the stats timer to be initialized with
+% the correct values once the management agent has started
handle_cast({force_event_refresh, Ref},
State = #q{consumers = Consumers,
active_consumer = Holder}) ->
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index f5c9e8dfce..d4c8ba4056 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -70,8 +70,6 @@
prioritise_call/4, prioritise_cast/3, prioritise_info/3,
format_message_queue/2]).
--deprecated([{force_event_refresh, 1, eventually}]).
-
%% Internal
-export([list_local/0, emit_info_local/3, deliver_reply_local/3]).
-export([get_vhost/1, get_user/1]).
@@ -452,6 +450,9 @@ ready_for_close(Pid) ->
-spec force_event_refresh(reference()) -> 'ok'.
+% Note: https://www.pivotaltracker.com/story/show/166962656
+% This event is necessary for the stats timer to be initialized with
+% the correct values once the management agent has started
force_event_refresh(Ref) ->
[gen_server2:cast(C, {force_event_refresh, Ref}) || C <- list()],
ok.
@@ -691,6 +692,9 @@ handle_cast({send_drained, CTagCredit},
|| {ConsumerTag, CreditDrained} <- CTagCredit],
noreply(State);
+% Note: https://www.pivotaltracker.com/story/show/166962656
+% This event is necessary for the stats timer to be initialized with
+% the correct values once the management agent has started
handle_cast({force_event_refresh, Ref}, State) ->
rabbit_event:notify(channel_created, infos(?CREATION_EVENT_KEYS, State),
Ref),
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 8f64a70b5f..6f3e993beb 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -66,8 +66,6 @@
-export([conserve_resources/3, server_properties/1]).
--deprecated([{force_event_refresh, 2, eventually}]).
-
-define(NORMAL_TIMEOUT, 3).
-define(CLOSING_TIMEOUT, 30).
-define(CHANNEL_TERMINATION_TIMEOUT, 3).
@@ -220,6 +218,9 @@ info(Pid, Items) ->
-spec force_event_refresh(pid(), reference()) -> 'ok'.
+% Note: https://www.pivotaltracker.com/story/show/166962656
+% This event is necessary for the stats timer to be initialized with
+% the correct values once the management agent has started
force_event_refresh(Pid, Ref) ->
gen_server:cast(Pid, {force_event_refresh, Ref}).