anchor.diff:              complete_old_vb_filter_change(State1)
       end;
   handle_call(had_backfill, From, #state{had_backfill = HadBF} = State) ->
  -    case HadBF#had_backfill.value of
  -        undefined ->
  +    #had_backfill{value = Value,
  +                  backfill_opaque = BFOpaque} = HadBF,
  +    case Value =/= undefined andalso BFOpaque =:= undefined of
  +        true ->
  +            {reply, Value, State};
  +        false ->
               OldWaiters = HadBF#had_backfill.waiters,
               NewBF = HadBF#had_backfill{waiters = [From | OldWaiters]},
  -            {noreply, State#state{had_backfill = NewBF}};
  -        Value ->
  -            {reply, Value, State}
  +            ?rebalance_debug("Suspended had_backfill waiter~n~p", [NewBF]),
  +            {noreply, State#state{had_backfill = NewBF}}
       end;
   handle_call(_Req, _From, State) ->
       {reply, unhandled, State}.
  
positive.code:          start_vbucket_filter_change/2,
           start_old_vbucket_filter_change/1,
           set_controlling_process/2,
           had_backfill/1]).
  
  -include("mc_constants.hrl").
  -include("mc_entry.hrl").
  
negative.code: %% @doc Process a packet from the downstream server.
  -spec process_downstream(<<_:8,_:_*8>>, #state{}) ->
                                  {ok, #state{}}.
  process_downstream(<<?RES_MAGIC:8, _Opcode:8, _KeyLen:16, _ExtLen:8, _DataType:8,
                       _VBucket:16, _BodyLen:32, Opaque:32, _CAS:64, _Rest/binary>> = Packet,
                     State) ->
      State#state.upstream_sender ! Packet,
      #had_backfill{value = BFValue,
                    waiters = Waiters,
                    backfill_opaque = BFOpaque} = HadBF = State#state.had_backfill,
      case BFOpaque =:= Opaque of
          true ->
              [gen_server:reply(From, BFValue)
               || From <- Waiters],
              case Waiters of
                  [] -> ok;
                  _ ->
                      ?rebalance_debug("Replied had_backfill: ~p to ~p", [BFValue, Waiters])
              end,
              NewBF = HadBF#had_backfill{waiters = [],
                                         backfill_opaque = undefined},
              {ok, State#state{had_backfill = NewBF}};
          false ->
              {ok, State}
      end.
  
  mark_takeover_seen(State) ->
      true = State#state.takeover,
  