summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2013-05-20 13:46:48 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2013-05-20 13:46:48 +0100
commit9e05c9a33b52da0eb732ce965ba598037b2ddf2c (patch)
treeed6dea4a2462c5ded316e304bca0160804a4b812
parent81ba1c011838df726b820a64332e22f2c8a7b521 (diff)
parent100822952ad9a94d5d6b8d66ce877e50bbe58101 (diff)
downloadrabbitmq-server-9e05c9a33b52da0eb732ce965ba598037b2ddf2c.tar.gz
merge stable into default
-rw-r--r--src/rabbit_autoheal.erl9
-rw-r--r--src/rabbit_channel.erl5
2 files changed, 5 insertions, 9 deletions
diff --git a/src/rabbit_autoheal.erl b/src/rabbit_autoheal.erl
index c00c2dd6..529d46b4 100644
--- a/src/rabbit_autoheal.erl
+++ b/src/rabbit_autoheal.erl
@@ -39,13 +39,8 @@
%% To coordinate the restarting nodes we pick a special node from the
%% winning partition - the "winner". Restarting nodes then stop, tell
%% the winner they have done so, and wait for it to tell them it is
-%% safe to start again.
-%%
-%% The winner and the leader are not necessarily the same node! Since
-%% the leader may end up restarting, we also make sure that it does
-%% not announce its decision (and thus cue other nodes to restart)
-%% until it has seen a request from every node that has experienced a
-%% partition.
+%% safe to start again. The winner and the leader are not necessarily
+%% the same node.
%%
%% Possible states:
%%
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 37041d34..1de14b5c 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1085,8 +1085,9 @@ handle_method(#'tx.commit'{}, _, #ch{tx = none}) ->
handle_method(#'tx.commit'{}, _, State = #ch{tx = {Msgs, Acks},
limiter = Limiter}) ->
State1 = rabbit_misc:queue_fold(fun deliver_to_queues/2, State, Msgs),
- lists:foreach(fun ({ack, A}) -> ack(A, State1);
- ({Requeue, A}) -> reject(Requeue, A, Limiter)
+ Rev = fun (X) -> lists:reverse(lists:sort(X)) end,
+ lists:foreach(fun ({ack, A}) -> ack(Rev(A), State1);
+ ({Requeue, A}) -> reject(Requeue, Rev(A), Limiter)
end, lists:reverse(Acks)),
{noreply, maybe_complete_tx(State1#ch{tx = committing})};