summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-08-20 15:43:20 +0100
committerMatthew Sackman <matthew@lshift.net>2009-08-20 15:43:20 +0100
commit4345618a753e8667365e3eac3890ec81140336f5 (patch)
tree687b2956d4bf69866ed3fbb232f863d7da6fbe58
parent1f4f6d0654c6d852313bdb066319f75600b2621f (diff)
downloadrabbitmq-server-git-4345618a753e8667365e3eac3890ec81140336f5.tar.gz
remove the unnecessary sync from tx_cancel. A cancel cannot be misinterleaved with a commit for the same transaction so it's not necessary.
-rw-r--r--src/rabbit_disk_queue.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rabbit_disk_queue.erl b/src/rabbit_disk_queue.erl
index c1744d6695..9e70f8c5a5 100644
--- a/src/rabbit_disk_queue.erl
+++ b/src/rabbit_disk_queue.erl
@@ -1120,12 +1120,11 @@ internal_publish(Q, Message = #basic_message { guid = MsgId },
{ok, {MsgId, WriteSeqId}, State1}.
internal_tx_cancel(MsgIds, State) ->
- State1 = sync_current_file_handle(State),
%% we don't need seq ids because we're not touching mnesia,
%% because seqids were never assigned
MsgSeqIds = lists:zip(MsgIds, lists:duplicate(erlang:length(MsgIds),
undefined)),
- remove_messages(undefined, MsgSeqIds, false, State1).
+ remove_messages(undefined, MsgSeqIds, false, State).
internal_requeue(_Q, [], State) ->
{ok, State};