anchor.diff:  reset_master_vbucket(Bucket) ->
       gen_server:call(server(Bucket), reset_master_vbucket, infinity).
   
  --define(csv_call(Call, Args),
  +-define(csv_call(Call, Kind, Bucket, DDocId, RestArgs),
           %% hack to not introduce any variables in the caller environment
           ((fun () ->
                     %% we may want to downgrade it to ?views_debug at some point
  -                  ?views_debug("~nCalling couch_set_view:~p(~w)", [Call, Args]),
  +                  ?views_debug("~nCalling couch_set_view:~p(~s, <<\"~s\">>, <<\"~s\">>, ~w)", [Call, Kind, Bucket, DDocId, RestArgs]),
                     try
  -                      {__Time, __Result} = timer:tc(couch_set_view, Call, Args),
  -
  -                      ?views_debug("~ncouch_set_view:~p(~w) returned ~p in ~bms",
  -                                   [Call, Args, __Result, __Time div 1000]),
  +                      {__Time, __Result} = timer:tc(couch_set_view, Call, [Kind, Bucket, DDocId | RestArgs]),
  +
  +                      ?views_debug("~ncouch_set_view:~p(~s, <<\"~s\">>, <<\"~s\">>, ~w) returned ~p in ~bms",
  +                                   [Call, Kind, Bucket, DDocId, RestArgs, __Result, __Time div 1000]),
                         __Result
                     catch
                         __T:__E ->
  -                          ?views_debug("~ncouch_set_view:~p(~w) raised ~p:~p",
  -                                       [Call, Args, __T, __E]),
  +                          ?views_debug("~ncouch_set_view:~p(~s, <<\"~s\">>, <<\"~s\">>, ~w) raised~n~p:~p",
  +                                       [Call, Kind, Bucket, DDocId, RestArgs, __T, __E]),
   
                             %% rethrowing the exception
                             __Stack = erlang:get_stacktrace(),
  
positive.code:                 ok;
              true ->
                  ok = ?csv_call(mark_partitions_indexable,
                                 [mapreduce_view, SetName, DDocId,
                                  UnpauseVBuckets])
          end,
  
          %% this should go first because some of the replica vbuckets might
          %% need to be cleaned up from main index
          ok = ?csv_call(set_partition_states,
                         [mapreduce_view, SetName, DDocId, Active, Passive,
                          Cleanup]),
  
          case UseReplicaIndex of
              true ->
                  ok = ?csv_call(add_replica_partitions,
                                 [mapreduce_view, SetName, DDocId, Replica]),
                  ok = ?csv_call(remove_replica_partitions,
                                 [mapreduce_view, SetName, DDocId,
                                  ReplicaCleanup]);
              false ->
                  ok
          end,
  
negative.code:                 ok;
              true ->
                  ok = ?csv_call(mark_partitions_unindexable,
                                 mapreduce_view, SetName, DDocId,
                                 [PauseVBuckets])
          end
  
      catch
  