summaryrefslogtreecommitdiff
path: root/src/rabbit_msg_store_gc.erl
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-09-15 17:21:20 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-09-15 17:21:20 +0100
commit96ff740ff960d5a7aefb816b909491af2b1937a6 (patch)
tree092970154aee0a16b418027822dd8e023b9a6d00 /src/rabbit_msg_store_gc.erl
parent5e375269b81f02d2fb74a334fb36d3b18eb407db (diff)
parenta7e36d635b4dab45320cd4744d8e0f3be5c946df (diff)
downloadrabbitmq-server-96ff740ff960d5a7aefb816b909491af2b1937a6.tar.gz
Merging bug 23157 into default
Diffstat (limited to 'src/rabbit_msg_store_gc.erl')
-rw-r--r--src/rabbit_msg_store_gc.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_msg_store_gc.erl b/src/rabbit_msg_store_gc.erl
index c7948b7e..a7855bbf 100644
--- a/src/rabbit_msg_store_gc.erl
+++ b/src/rabbit_msg_store_gc.erl
@@ -38,7 +38,7 @@
-export([set_maximum_since_use/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
- terminate/2, code_change/3]).
+ terminate/2, code_change/3, prioritise_cast/2]).
-record(gcstate,
{dir,
@@ -81,7 +81,7 @@ stop(Server) ->
gen_server2:call(Server, stop, infinity).
set_maximum_since_use(Pid, Age) ->
- gen_server2:pcast(Pid, 8, {set_maximum_since_use, Age}).
+ gen_server2:cast(Pid, {set_maximum_since_use, Age}).
%%----------------------------------------------------------------------------
@@ -97,6 +97,9 @@ init([Parent, Dir, IndexState, IndexModule, FileSummaryEts]) ->
hibernate,
{backoff, ?HIBERNATE_AFTER_MIN, ?HIBERNATE_AFTER_MIN, ?DESIRED_HIBERNATE}}.
+prioritise_cast({set_maximum_since_use, _Age}, _State) -> 8;
+prioritise_cast(_Msg, _State) -> 0.
+
handle_call(stop, _From, State) ->
{stop, normal, ok, State}.