anchor.diff:                               [Partition, mc_client_binary:vbucket_state_to_atom(VbState)]),
               case VbState of
                   ?VB_STATE_ACTIVE ->
  -                    gen_server:reply(From, ok),
  -                    {proxy, State#state{state = idle}};
  +                    NewTakeoverState = TakeoverState#takeover_state{state = active},
  +                    {proxy, maybe_reply_takeover(From, NewTakeoverState, State)};
                   _ ->
                       {proxy, State#state{state =
                                               TakeoverState#takeover_state{
  
positive.code:             State
      end.
  
  setup_streams(Pid, Partitions) ->
      gen_server:call(Pid, {setup_streams, Partitions}, infinity).
  
  
negative.code:     {block, maybe_reply_setup_streams(NewState#state{state = NewStreamState})};
  
  handle_packet(response, ?UPR_ADD_STREAM, Packet,
                #state{state = #takeover_state{owner = From, partition = Partition, open_ack = false}
                       = TakeoverState} = State, _ParentState) ->
  
      {Header, Body} = mc_binary:decode_packet(Packet),
      case {upr_commands:process_response(Header, Body), Header#mc_header.opaque} of
          {{ok, _}, Partition} ->
              NewTakeoverState = TakeoverState#takeover_state{open_ack = true},
              {block, maybe_reply_takeover(From, NewTakeoverState, State)};
          {Error, Partition} ->
              gen_server:reply(From, Error),
              {block, State#state{state = idle}};
          {_, WrongOpaque} ->
              ?rebalance_error("Unexpected response. Unrecognized opaque ~p~nHeader: ~p~nPartition: ~p",
                               [WrongOpaque, Header, Partition]),
              erlang:error({unrecognized_opaque, WrongOpaque, Partition})
      end;
  
  handle_packet(request, ?UPR_STREAM_REQ, Packet,
  