summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-09-02 16:00:18 +0100
committerMatthew Sackman <matthew@lshift.net>2009-09-02 16:00:18 +0100
commitf0daa43f6f09711186e3cd21ba6c74d6f2e2926f (patch)
tree9aef2cbc6894a47edde57ce074acbb7b0f3e8337
parentad16306f66de365f14afeb18605ae5a9985e9c9a (diff)
downloadrabbitmq-server-git-f0daa43f6f09711186e3cd21ba6c74d6f2e2926f.tar.gz
Shutdown III: Inline Vaporisation
-rw-r--r--src/rabbit_disk_queue.erl10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rabbit_disk_queue.erl b/src/rabbit_disk_queue.erl
index f0402be6c6..a5c60250b5 100644
--- a/src/rabbit_disk_queue.erl
+++ b/src/rabbit_disk_queue.erl
@@ -480,7 +480,9 @@ handle_call({foldl, Fun, Init, Q}, _From, State) ->
handle_call(stop, _From, State) ->
{stop, normal, ok, State}; %% gen_server now calls terminate
handle_call(stop_vaporise, _From, State) ->
- {ok, State1} = vaporise(State),
+ State1 = shutdown(State),
+ {atomic, ok} = mnesia:clear_table(rabbit_disk_queue),
+ lists:foreach(fun file:delete/1, filelib:wildcard(form_filename("*"))),
{stop, normal, ok, State1}; %% gen_server now calls terminate
handle_call(to_disk_only_mode, _From, State) ->
reply(ok, to_disk_only_mode(State));
@@ -587,12 +589,6 @@ shutdown(State = #dqstate { msg_location_dets = MsgLocationDets,
read_file_handle_cache = HC1
}.
-vaporise(State) ->
- State1 = shutdown(State),
- {atomic, ok} = mnesia:clear_table(rabbit_disk_queue),
- lists:foreach(fun file:delete/1, filelib:wildcard(form_filename("*"))),
- {ok, State1}.
-
code_change(_OldVsn, State, _Extra) ->
{ok, State}.