diff options
author | Emile Joubert <emile@rabbitmq.com> | 2011-02-11 12:51:50 +0000 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2011-02-11 12:51:50 +0000 |
commit | 99ac15fbc28d60adc0d38899a5a7f770530ca466 (patch) | |
tree | 659e5593445df386e9582ba542c2abf18027ffa0 /src/rabbit_variable_queue.erl | |
parent | 340ae1fdefe6b7b9558292ca1e7ff43ecde06ac4 (diff) | |
download | rabbitmq-server-99ac15fbc28d60adc0d38899a5a7f770530ca466.tar.gz |
Upgrade messages
Diffstat (limited to 'src/rabbit_variable_queue.erl')
-rw-r--r-- | src/rabbit_variable_queue.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 7142d560..f2176c0e 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -22,7 +22,7 @@ requeue/3, len/1, is_empty/1, dropwhile/2, set_ram_duration_target/2, ram_duration/1, needs_idle_timeout/1, idle_timeout/1, handle_pre_hibernate/1, - status/1]). + status/1, transform_storage/1]). -export([start/1, stop/0]). @@ -1801,3 +1801,16 @@ push_betas_to_deltas(Generator, Limit, Q, Count, RamIndexCount, IndexState) -> push_betas_to_deltas( Generator, Limit, Qa, Count + 1, RamIndexCount1, IndexState1) end. + +%%---------------------------------------------------------------------------- +%% Upgrading +%%---------------------------------------------------------------------------- + +%% Assumes message store is not running +transform_storage(TransformFun) -> + transform_store(?PERSISTENT_MSG_STORE, TransformFun) + + transform_store(?TRANSIENT_MSG_STORE, TransformFun). + +transform_store(Store, TransformFun) -> + rabbit_msg_store:force_recovery(rabbit_mnesia:dir(), Store), + rabbit_msg_store:transform_dir(rabbit_mnesia:dir(), Store, TransformFun). |