summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-05-24 17:38:14 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-05-24 17:38:14 +0100
commited518e836df619635776c4d93696e487d4a7a198 (patch)
treecad4ddd92350d58c0995a31bca853ec6dce1e155 /include
parent06c3ac40bba9c60305612ea9fae8440892a19a00 (diff)
downloadrabbitmq-server-git-ed518e836df619635776c4d93696e487d4a7a198.tar.gz
Permit dropping nodes of mirrored queues. This turns out to be much much messier than I'd hoped as the principle problem becomes ensuring an add after a drop works. Normally, an add would only occur on a node that has not seen said queue before: if it had, in a previous lifetime, then the booting of rabbit would have ripped out any locally stored files regarding that queue. But now this step may be missed. Having tried many different approaches, the simplest became expanding bq so that the shutdown reason is exposed to the BQ. Thus both slave and master can then detect that they're being dropped, and, in the case of master, it can convert a bq:terminate to a bq:delete_and_terminate. Every other approach I could think of turned out worse.
Diffstat (limited to 'include')
-rw-r--r--include/rabbit_backing_queue_spec.hrl4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl
index 1c2b94e267..295d90394f 100644
--- a/include/rabbit_backing_queue_spec.hrl
+++ b/include/rabbit_backing_queue_spec.hrl
@@ -32,8 +32,8 @@
-spec(stop/0 :: () -> 'ok').
-spec(init/4 :: (rabbit_types:amqqueue(), attempt_recovery(),
async_callback(), sync_callback()) -> state()).
--spec(terminate/1 :: (state()) -> state()).
--spec(delete_and_terminate/1 :: (state()) -> state()).
+-spec(terminate/2 :: (any(), state()) -> state()).
+-spec(delete_and_terminate/2 :: (any(), state()) -> state()).
-spec(purge/1 :: (state()) -> {purged_msg_count(), state()}).
-spec(publish/4 :: (rabbit_types:basic_message(),
rabbit_types:message_properties(), pid(), state()) ->