summaryrefslogtreecommitdiff
path: root/src/rabbit_mirror_queue_slave.erl
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-08-31 19:08:40 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-08-31 19:08:40 +0100
commit8cddf06bea147e94230e8a75a3f460c178960ac9 (patch)
treed29bec2d16d93d2e88116c387965d35a5622ca2c /src/rabbit_mirror_queue_slave.erl
parent188a756593a26db18345f6a95145f9bc9e35164e (diff)
downloadrabbitmq-server-8cddf06bea147e94230e8a75a3f460c178960ac9.tar.gz
refactoring: make the var match the field
Diffstat (limited to 'src/rabbit_mirror_queue_slave.erl')
-rw-r--r--src/rabbit_mirror_queue_slave.erl15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index 6882b2da..5111f46a 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -885,9 +885,8 @@ process_instruction({sender_death, ChPid},
msg_id_status = MS1,
known_senders = pmon:demonitor(ChPid, KS) }
end};
-process_instruction({length, Length, ExtPending}, State) ->
- {ok, set_synchronised(Length,
- State #state { unknown_pending = ExtPending })};
+process_instruction({length, Length, Pend}, State) ->
+ {ok, set_synchronised(Length, State #state { unknown_pending = Pend })};
process_instruction({delete_and_terminate, Reason},
State = #state { backing_queue = BQ,
backing_queue_state = BQS }) ->
@@ -920,14 +919,14 @@ set_synchronised(_, _, State = #state { unknown_pending = undefined }) ->
set_synchronised(PendingDelta, Length,
State = #state { backing_queue = BQ,
backing_queue_state = BQS,
- unknown_pending = ExtPending,
+ unknown_pending = Pend,
synchronised = Sync}) ->
- ExtPending1 = ExtPending + PendingDelta,
- true = ExtPending1 >= 0,
- State1 = State #state { unknown_pending = ExtPending1 },
+ Pend1 = Pend + PendingDelta,
+ true = Pend1 >= 0,
+ State1 = State #state { unknown_pending = Pend1 },
%% We intentionally leave out the head where a slave becomes
%% unsynchronised: we assert that can never happen.
- case {Sync, ExtPending1 =:= 0 andalso Length =:= BQ:len(BQS)} of
+ case {Sync, Pend1 =:= 0 andalso Length =:= BQ:len(BQS)} of
{true, true} ->
State1;
{false, false} ->