summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-09-17 11:44:17 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-09-17 11:44:17 +0100
commit074e3618cefdcd548cd04f81049e9e518dd41f81 (patch)
tree0f7dc4b1a4d33e87e879a614b729cb7ecf08e4ee
parent8b568a8ea5812df577c0af2901081c63abe47d96 (diff)
downloadrabbitmq-server-074e3618cefdcd548cd04f81049e9e518dd41f81.tar.gz
Pass the full queue to BQ:delete_crashed/1 since priority_queue will need it.
-rw-r--r--src/rabbit_amqqueue.erl4
-rw-r--r--src/rabbit_backing_queue.erl2
-rw-r--r--src/rabbit_variable_queue.erl2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 66f04381..c4abfd9d 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -610,9 +610,9 @@ delete(#amqqueue{ pid = QPid }, IfUnused, IfEmpty) ->
delete_crashed(#amqqueue{ pid = QPid } = Q) ->
ok = rpc:call(node(QPid), ?MODULE, delete_crashed_internal, [Q]).
-delete_crashed_internal(#amqqueue{ name = QName }) ->
+delete_crashed_internal(Q = #amqqueue{ name = QName }) ->
{ok, BQ} = application:get_env(rabbit, backing_queue_module),
- BQ:delete_crashed(QName),
+ BQ:delete_crashed(Q),
ok = internal_delete(QName).
purge(#amqqueue{ pid = QPid }) -> delegate:call(QPid, purge).
diff --git a/src/rabbit_backing_queue.erl b/src/rabbit_backing_queue.erl
index 310b8220..b4bdb0af 100644
--- a/src/rabbit_backing_queue.erl
+++ b/src/rabbit_backing_queue.erl
@@ -87,7 +87,7 @@
%% Called to clean up after a crashed queue. In this case we don't
%% have a process and thus a state(), we are just removing on-disk data.
--callback delete_crashed(rabbit_amqqueue:name()) -> 'ok'.
+-callback delete_crashed(rabbit_types:amqqueue()) -> 'ok'.
%% Remove all 'fetchable' messages from the queue, i.e. all messages
%% except those that have been fetched already and are pending acks.
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index e858fb3d..03ba2819 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -511,7 +511,7 @@ delete_and_terminate(_Reason, State) ->
a(State2 #vqstate { index_state = IndexState1,
msg_store_clients = undefined }).
-delete_crashed(QName) ->
+delete_crashed(#amqqueue{name = QName}) ->
ok = rabbit_queue_index:erase(QName).
purge(State = #vqstate { q4 = Q4,