anchor.diff:      end.
   
   gather_op_stats_body(Bucket, Nodes, ClientTStamp,
  -                   Ref, PeriodParams) ->
  +                     Ref, PeriodParams) ->
       FirstNode = case Nodes of
  -                    all -> node();
  +                    all ->
  +                        AvailableNodes = ns_bucket:live_bucket_nodes(Bucket),
  +                        case lists:member(node(), AvailableNodes) of
  +                            true ->
  +                                node();
  +                            _ ->
  +                                case AvailableNodes of
  +                                    [] ->
  +                                        none;
  +                                    [FN | _] ->
  +                                        FN
  +                                end
  +                        end;
                       [X] -> X
                   end,
  -    RV = invoke_archiver(Bucket, FirstNode, PeriodParams),
  +
  +    RV = case FirstNode of
  +             none ->
  +                 [];
  +             _ ->
  +                 invoke_archiver(Bucket, FirstNode, PeriodParams)
  +         end,
  +
       case RV of
  -        [] -> {[], [], ClientTStamp, PeriodParams};
  -        [_] -> {[], [], ClientTStamp, PeriodParams};
  +        [] -> {FirstNode, [], [], ClientTStamp, PeriodParams};
  +        [_] -> {FirstNode, [], [], ClientTStamp, PeriodParams};
           _ ->
               %% we throw out last sample 'cause it might be missing on other nodes yet
               %% previous samples should be ok on all live nodes
  
positive.code:     end.
  
  build_per_node_stats(BucketName, StatName, Params, LocalAddr) ->
      {MainSamples, Replies, ClientTStamp, {Step, _, Window}}
          = gather_op_stats(BucketName, all, Params),
  
      StatExtractor = build_stat_extractor(BucketName, StatName),
  
      RestSamplesRaw = lists:keydelete(node(), 1, Replies),
      Nodes = [node() | [N || {N, _} <- RestSamplesRaw]],
      AllNodesSamples = [{node(), lists:reverse(MainSamples)} | RestSamplesRaw],
  
      NodesSamples = [lists:map(StatExtractor, NodeSamples) || {_, NodeSamples} <- AllNodesSamples],
  
  
negative.code:                         Ref ->
                              gather_op_stats_body(Bucket, Nodes, ClientTStamp, [], PeriodParams)
                      after 2000 ->
                              {FirstNode, [], [], ClientTStamp, PeriodParams}
                      end;
                  _ ->
                      %% cut samples up-to and including ClientTStamp
  