anchor.diff:                        [Nodes, VBucket]),
                       Chain
               end;
  -        C = [{_, active}|ReplicaStates] ->
  +        C = [{_, MasterState}|ReplicaStates] when MasterState =:= active orelse MasterState =:= zombie ->
               lists:foreach(
                 fun ({_, {N, active}}) ->
                         ?log_error("Active replica ~p for vbucket ~p. "
  
positive.code:                       ok;
                    ({_, {undefined, missing}}) -> % Probably fewer nodes than copies
                        ok;
                    ({{M, _}, {N, _}}) ->
                        %% Only do anything if the replica's not a zombie
                        case lists:member(N, Zombies) of
                            true->
                                ok;
                            false ->
                                ?log_info("Killing replicators for vbucket ~p on"
                                          " master ~p", [VBucket, M]),
                                ns_vbm_sup:kill_children(M, Bucket, [VBucket])
                        end
                end, misc:pairs(C)),
              HaveAllCopies = lists:all(
                                fun ({undefined, _}) -> false;
  
negative.code:     NodeStates = [{N, S} || {N, V, S} <- States, V == VBucket],
      ChainStates = lists:map(fun (N) ->
                                      case lists:keyfind(N, 1, NodeStates) of
                                          false -> {N, case lists:member(N, Zombies) of
                                                           true -> zombie;
                                                           _ -> missing
                                                       end};
                                          X -> X
                                      end
                              end, Chain),
  