diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2010-11-02 13:19:27 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2010-11-02 13:19:27 +0000 |
| commit | 88055eaabdb66e5eee33aaaf3b2f9035f7720a78 (patch) | |
| tree | 30874be305266f9ee75594ef621871c53edcbe3c /src | |
| parent | 39a40495cc1e1243717be5f0a3fb0d5b82b3ac85 (diff) | |
| parent | ba3f707dfe7d97ef80ee98f9455128ff91dd5540 (diff) | |
| download | rabbitmq-server-git-88055eaabdb66e5eee33aaaf3b2f9035f7720a78.tar.gz | |
Merge bug23454 into default (Enabling stats prevents hibernation, resulting in excessive memory use)
Diffstat (limited to 'src')
| -rw-r--r-- | src/delegate.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_channel.erl | 7 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/delegate.erl b/src/delegate.erl index e50b99f141..11abe73b0d 100644 --- a/src/delegate.erl +++ b/src/delegate.erl @@ -206,7 +206,7 @@ handle_cast({thunk, Thunk}, State) -> {noreply, State, hibernate}. handle_info(_Info, State) -> - {noreply, State}. + {noreply, State, hibernate}. terminate(_Reason, _State) -> ok. diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 6048920e2b..fe2c975b4e 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -994,7 +994,7 @@ handle_cast(emit_stats, State = #q{stats_timer = StatsTimer}) -> emit_stats(State), State1 = State#q{stats_timer = rabbit_event:reset_stats_timer(StatsTimer)}, assert_invariant(State1), - {noreply, State1}. + {noreply, State1, hibernate}. handle_info({'DOWN', _MonitorRef, process, DownPid, _Reason}, State = #q{q = #amqqueue{exclusive_owner = DownPid}}) -> diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 58c8e34122..873268cdd9 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -233,7 +233,7 @@ handle_cast({method, Method, Content}, State) -> end; handle_cast({flushed, QPid}, State) -> - {noreply, queue_blocked(QPid, State)}; + {noreply, queue_blocked(QPid, State), hibernate}; handle_cast(terminate, State) -> {stop, normal, State}; @@ -258,11 +258,12 @@ handle_cast({deliver, ConsumerTag, AckRequired, Msg}, handle_cast(emit_stats, State = #ch{stats_timer = StatsTimer}) -> internal_emit_stats(State), {noreply, - State#ch{stats_timer = rabbit_event:reset_stats_timer(StatsTimer)}}. + State#ch{stats_timer = rabbit_event:reset_stats_timer(StatsTimer)}, + hibernate}. handle_info({'DOWN', _MRef, process, QPid, _Reason}, State) -> erase_queue_stats(QPid), - {noreply, queue_blocked(QPid, State)}. + {noreply, queue_blocked(QPid, State), hibernate}. handle_pre_hibernate(State = #ch{stats_timer = StatsTimer}) -> ok = clear_permission_cache(), |
