summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2017-07-18 17:21:00 +0200
committerGerhard Lazu <gerhard@lazu.co.uk>2017-07-24 16:22:24 +0100
commit5f03dcc56cd77e6474aab10663860d34c2a8e462 (patch)
tree53d402a2943b9e063b2bd64b92fe77a86488794b /src
parent46eb2e540332ffd727e513e2e12ba25d88737faa (diff)
downloadrabbitmq-server-git-5f03dcc56cd77e6474aab10663860d34c2a8e462.tar.gz
Remove hibernate from GM
We don't want to use the backoff/hibernate feature because we have observed that the GM process is suspended half of the time. We really wanted to replace gen_server2 with gen_server, but it was more important to keep changes in 3.6 to a minimum. GM will eventually be replaced, so switching it from gen_server2 to gen_server will be soon redundant. We simply do not understand some of the gen_server2 trade-offs well enough to feel strongly about this change. [#148892851] Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
Diffstat (limited to 'src')
-rw-r--r--src/gm.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gm.erl b/src/gm.erl
index 7604b9e197..5679fc30e5 100644
--- a/src/gm.erl
+++ b/src/gm.erl
@@ -552,8 +552,7 @@ init([GroupName, Module, Args, TxnFun]) ->
broadcast_buffer_sz = 0,
broadcast_timer = undefined,
txn_executor = TxnFun,
- shutting_down = false }, hibernate,
- {backoff, ?HIBERNATE_AFTER_MIN, ?HIBERNATE_AFTER_MIN, ?DESIRED_HIBERNATE}}.
+ shutting_down = false }}.
handle_call({confirmed_broadcast, _Msg}, _From,
@@ -888,7 +887,7 @@ noreply(State) ->
reply(Reply, State) ->
{reply, Reply, ensure_broadcast_timer(State), flush_timeout(State)}.
-flush_timeout(#state{broadcast_buffer = []}) -> hibernate;
+flush_timeout(#state{broadcast_buffer = []}) -> infinity;
flush_timeout(_) -> 0.
ensure_broadcast_timer(State = #state { broadcast_buffer = [],