summaryrefslogtreecommitdiff
path: root/src/rabbit_amqqueue_process.erl
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-04-13 15:27:29 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-04-13 15:27:29 +0100
commit65dab4241fb3edf8b1fd8da8fe9d5536623e6184 (patch)
treeda037a99887a3eb806c98dc02d6217280288dd06 /src/rabbit_amqqueue_process.erl
parente326e7b7b90f232ef0c9d0e5875cf793d2175a9b (diff)
downloadrabbitmq-server-65dab4241fb3edf8b1fd8da8fe9d5536623e6184.tar.gz
Forgot to undo these bits, and the boot sequence has been changed, so debitrot
Diffstat (limited to 'src/rabbit_amqqueue_process.erl')
-rw-r--r--src/rabbit_amqqueue_process.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 53bdd3b2..a8b19b72 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -1234,11 +1234,15 @@ handle_pre_hibernate(State = #q{backing_queue_state = undefined}) ->
handle_pre_hibernate(State = #q{backing_queue = BQ,
backing_queue_state = BQS,
stats_timer = StatsTimer}) ->
- BQS1 = rabbit_amqqueue_process_utils:backing_queue_pre_hibernate(BQ, BQS),
+ {RamDuration, BQS1} = BQ:ram_duration(BQS),
+ DesiredDuration =
+ rabbit_memory_monitor:report_ram_duration(self(), RamDuration),
+ BQS2 = BQ:set_ram_duration_target(DesiredDuration, BQS1),
+ BQS3 = BQ:handle_pre_hibernate(BQS2),
rabbit_event:if_enabled(StatsTimer,
fun () ->
emit_stats(State, [{idle_since, now()}])
end),
State1 = State#q{stats_timer = rabbit_event:stop_stats_timer(StatsTimer),
- backing_queue_state = BQS1},
+ backing_queue_state = BQS3},
{hibernate, stop_rate_timer(State1)}.