Permalink
Browse files

Hacks to only use new calling format for riak_kv_index_fsm

  • Loading branch information...
1 parent 58dd448 commit 1cb68e73117f9e8db3e1ccd2e7da4175d377b2df @reiddraper reiddraper committed May 8, 2012
Showing with 15 additions and 2 deletions.
  1. +15 −2 src/riak_core_coverage_fsm.erl
@@ -205,7 +205,14 @@ initialize(timeout, StateData0=#state{mod=Mod,
{error, Reason} ->
Mod:finish({error, Reason}, ModState);
{CoverageVNodes, FilterVNodes} ->
- {ok, UpModState} = Mod:plan(CoverageVNodes, ModState),
+ UpModState = case Mod of
+ riak_kv_index_fsm ->
+ {ok, NewModState} = Mod:plan(CoverageVNodes, ModState),
+ NewModState;
+ _ ->
+ ModState
+ end,
+
Sender = {fsm, ReqId, self()},
riak_core_vnode_master:coverage(Request,
CoverageVNodes,
@@ -224,7 +231,13 @@ waiting_results({{ReqId, VNode}, Results},
mod_state=ModState,
req_id=ReqId,
timeout=Timeout}) ->
- case Mod:process_results({VNode, Results}, ModState) of
+ Response = case Mod of
+ riak_kv_index_fsm ->
+ Mod:process_results({VNode, Results}, ModState);
+ _ ->
+ Mod:process_results(Results, ModState)
+ end,
+ case Response of
{ok, UpdModState} ->
UpdStateData = StateData#state{mod_state=UpdModState},
{next_state, waiting_results, UpdStateData, Timeout};

0 comments on commit 1cb68e7

Please sign in to comment.