summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-01-07 18:16:41 +0000
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-01-07 18:16:41 +0000
commit10019f2985e35118b6535d4d9fd6b227a33183ac (patch)
treec3085fa0d01a06fbd2a30222e64246f5357a9826
parentc1ed96f54d78908639925800fb11cff0d24a4970 (diff)
downloadrabbitmq-server-bug23612.tar.gz
rename WaitForIndex to ActionTakenbug23612
-rw-r--r--src/rabbit_msg_store.erl8
-rw-r--r--src/rabbit_variable_queue.erl8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index c50be9c9..7c5abbcd 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -739,7 +739,7 @@ handle_cast({remove, CRef, Guids}, State) ->
fun (Guid, State2) -> remove_message(Guid, State2) end,
State, Guids),
State2 = client_confirm(CRef, gb_sets:from_list(Guids),
- false, State1),
+ removed, State1),
noreply(maybe_compact(State2));
handle_cast({release, Guids}, State =
@@ -876,7 +876,7 @@ internal_sync(State = #msstate { current_file_handle = CurHdl,
true -> file_handle_cache:sync(CurHdl)
end,
lists:foreach(fun (K) -> K() end, lists:reverse(Syncs)),
- [client_confirm(CRef, Guids, true, State1)
+ [client_confirm(CRef, Guids, written, State1)
|| {CRef, Guids} <- CGs],
State1 #msstate { cref_to_guids = dict:new(), on_sync = [] }.
@@ -1057,11 +1057,11 @@ orddict_store(Key, Val, Dict) ->
false = orddict:is_key(Key, Dict),
orddict:store(Key, Val, Dict).
-client_confirm(CRef, Guids, WaitForIndex,
+client_confirm(CRef, Guids, ActionTaken,
State = #msstate { client_ondisk_callback = CODC,
cref_to_guids = CTG }) ->
case dict:find(CRef, CODC) of
- {ok, Fun} -> Fun(Guids, WaitForIndex),
+ {ok, Fun} -> Fun(Guids, ActionTaken),
CTG1 = case dict:find(CRef, CTG) of
{ok, Gs} ->
Guids1 = gb_sets:difference(Gs, Guids),
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index c30be37c..48baeea6 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -412,8 +412,8 @@ stop_msg_store() ->
init(QueueName, IsDurable, Recover) ->
Self = self(),
init(QueueName, IsDurable, Recover,
- fun (Guids, WaitForIndex) ->
- msgs_written_to_disk(Self, Guids, WaitForIndex)
+ fun (Guids, ActionTaken) ->
+ msgs_written_to_disk(Self, Guids, ActionTaken)
end,
fun (Guids) -> msg_indices_written_to_disk(Self, Guids) end).
@@ -1402,9 +1402,9 @@ blind_confirm(QPid, GuidSet) ->
msgs_confirmed(GuidSet, State)
end).
-msgs_written_to_disk(QPid, GuidSet, false) ->
+msgs_written_to_disk(QPid, GuidSet, removed) ->
blind_confirm(QPid, GuidSet);
-msgs_written_to_disk(QPid, GuidSet, true) ->
+msgs_written_to_disk(QPid, GuidSet, written) ->
rabbit_amqqueue:maybe_run_queue_via_backing_queue_async(
QPid, fun (State = #vqstate { msgs_on_disk = MOD,
msg_indices_on_disk = MIOD,