diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_mirror_queue_coordinator.erl | 7 | ||||
| -rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 12 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/rabbit_mirror_queue_coordinator.erl b/src/rabbit_mirror_queue_coordinator.erl index 729749dc48..8ddda1cd43 100644 --- a/src/rabbit_mirror_queue_coordinator.erl +++ b/src/rabbit_mirror_queue_coordinator.erl @@ -256,9 +256,10 @@ handle_call(get_gm, _From, State = #state { gm = GM }) -> handle_cast({gm_deaths, Deaths}, State = #state { q = #amqqueue { name = QueueName } }) -> - rabbit_log:info("Master ~p saw deaths ~p for ~s~n", - [self(), [{Pid, node(Pid)} || Pid <- Deaths], - rabbit_misc:rs(QueueName)]), + rabbit_log:info("Mirrored-queue (~s): Master ~s saw deaths of mirrors ~s~n", + [rabbit_misc:rs(QueueName), + rabbit_misc:pid_to_string(self()), + [[rabbit_misc:pid_to_string(Pid), $ ] || Pid <- Deaths]]), case rabbit_mirror_queue_misc:remove_from_queue(QueueName, Deaths) of {ok, Pid} when node(Pid) =:= node() -> noreply(State); diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index da01e0764b..fc50c93294 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -143,9 +143,10 @@ handle_call({gm_deaths, Deaths}, From, State = #state { q = #amqqueue { name = QueueName }, gm = GM, master_node = MNode }) -> - rabbit_log:info("Slave ~p saw deaths ~p for ~s~n", - [self(), [{Pid, node(Pid)} || Pid <- Deaths], - rabbit_misc:rs(QueueName)]), + rabbit_log:info("Mirrored-queue (~s): Slave ~s saw deaths of mirrors ~s~n", + [rabbit_misc:rs(QueueName), + rabbit_misc:pid_to_string(self()), + [[rabbit_misc:pid_to_string(Pid), $ ] || Pid <- Deaths]]), %% The GM has told us about deaths, which means we're not going to %% receive any more messages from GM case rabbit_mirror_queue_misc:remove_from_queue(QueueName, Deaths) of @@ -392,8 +393,9 @@ promote_me(From, #state { q = Q, sender_queues = SQ, msg_id_ack = MA, msg_id_status = MS }) -> - rabbit_log:info("Promoting slave ~p for ~s~n", - [self(), rabbit_misc:rs(Q #amqqueue.name)]), + rabbit_log:info("Mirrored-queue (~s): Promoting slave ~s to master~n", + [rabbit_misc:rs(Q #amqqueue.name), + rabbit_misc:pid_to_string(self())]), {ok, CPid} = rabbit_mirror_queue_coordinator:start_link(Q, GM), true = unlink(GM), gen_server2:reply(From, {promote, CPid}), |
