summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-03-10 16:30:53 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-03-10 16:30:53 +0000
commit7f5fcc545db0f4b773bbd002f53017906753188b (patch)
tree527e8eb0857203d225bfc2b94a09194582e1fe29 /src
parent83aeface9ebfaf7e5f2584fb676e674bb044d8a1 (diff)
downloadrabbitmq-server-git-7f5fcc545db0f4b773bbd002f53017906753188b.tar.gz
Remove erroneous loss of state. Whilst this now can cause a memory leak, it only affects the master, the dict is not particularly rich, and it'll only be left with entries for dead channels (most likely channels that were on the old master). Also, we might very well be able to address this through other means
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_mirror_queue_master.erl10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/rabbit_mirror_queue_master.erl b/src/rabbit_mirror_queue_master.erl
index 388f5ce39b..54c718b1c5 100644
--- a/src/rabbit_mirror_queue_master.erl
+++ b/src/rabbit_mirror_queue_master.erl
@@ -141,8 +141,7 @@ dropwhile(Fun, State = #state { gm = GM,
fetch(AckRequired, State = #state { gm = GM,
backing_queue = BQ,
backing_queue_state = BQS,
- set_delivered = SetDelivered,
- seen_status = SS }) ->
+ set_delivered = SetDelivered }) ->
{Result, BQS1} = BQ:fetch(AckRequired, BQS),
State1 = State #state { backing_queue_state = BQS1 },
case Result of
@@ -153,13 +152,8 @@ fetch(AckRequired, State = #state { gm = GM,
ok = gm:broadcast(GM, {fetch, AckRequired, MsgId, Remaining}),
IsDelivered1 = IsDelivered orelse SetDelivered > 0,
SetDelivered1 = lists:max([0, SetDelivered - 1]),
- SS1 = case SetDelivered + SetDelivered1 of
- 1 -> dict:new(); %% transition to empty
- _ -> SS
- end,
{{Message, IsDelivered1, AckTag, Remaining},
- State1 #state { set_delivered = SetDelivered1,
- seen_status = SS1 }}
+ State1 #state { set_delivered = SetDelivered1 }}
end.
ack(AckTags, State = #state { gm = GM,