diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-10-13 18:07:23 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-10-13 18:07:23 +0100 |
| commit | d45430efc624b8a0a81f2aceb415942e25af30f1 (patch) | |
| tree | 7eb48c950ba71906602b09f2a458d237ca9382af /src/rabbit.erl | |
| parent | 4ef2ed434c2f3c2c8e83ff6670ad7347f390b562 (diff) | |
| download | rabbitmq-server-git-d45430efc624b8a0a81f2aceb415942e25af30f1.tar.gz | |
Be a bit more clever on starting the message store and look up durable queues. However, it's still not quite right because queues can be deleted by other nodes in the cluster between extracting the list of durable queues in msg_store startup and the startup of queues themselves. This means that we can end up seeding the msg_store with msgs from queues that won't actually start up. You might think that we'd be saved by the fact that _process:terminate deletes the queue, but no, because fwics, _process isn't trapping exits, meaning that the terminate won't be called (and most likely rightly so so that it doesn't upset mnesia's state) by the exit(Pid, shutdown) in amqqueue:recover. So there still needs to be some sort of fix somewhere and somehow
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index b859c4affa..1c0f0f9112 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -149,15 +149,15 @@ start(normal, []) -> ok = start_child(rabbit_router), ok = start_child(rabbit_node_monitor), - ok = start_child(rabbit_guid), - %% TODO - this should probably use start_child somehow too - ok = rabbit_queue_index:start_msg_store() + ok = start_child(rabbit_guid) end}, {"recovery", fun () -> ok = maybe_insert_default_data(), ok = rabbit_exchange:recover(), - {ok, _DurableQueues} = rabbit_amqqueue:recover() + %% TODO - this should probably use start_child somehow too + {ok, DurableQueues} = rabbit_queue_index:start_msg_store(), + {ok, _RealDurableQueues} = rabbit_amqqueue:recover(DurableQueues) %% TODO - don't use disk_queue any more! %% ok = rabbit_disk_queue:delete_non_durable_queues( %% [ Q #amqqueue.name || Q <- DurableQueues ]) |
