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
commitf0cb7e165ced609d9909b3ef9b528442f63dc658 (patch)
treecad4ddd92350d58c0995a31bca853ec6dce1e155 /include
parentb4963dd7aae39e8f8c5306b9d39af6deb7623e63 (diff)
downloadrabbitmq-server-f0cb7e165ced609d9909b3ef9b528442f63dc658.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 1c2b94e2..295d9039 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()) ->