anchor.diff:           heartbeat/2,
            last_label/1,
            update_completed/5,
  -         send_label_delay/5,
            check_ready/1]).
   
   -record(state, {partition,
                   seq :: non_neg_integer(),
                   max_ts,
                   last_label,
  -                delay,
                   myid}).
   
   %% API
  
positive.code:     ?BACKEND_CONNECTOR_FSM:start_link(update, {Key, Value, TimeStamp, Seq1}),
      {reply, {ok, TimeStamp}, S0#state{max_ts=TimeStamp, seq=Seq1, last_label={Key, TimeStamp, {Partition, node()}}}};
  
  handle_command({update_completed, Key, Value, TimeStamp, Seq}, _From, S0=#state{partition=Partition, myid=MyId, delay=Delay}) ->
      Label = {Key, TimeStamp, {Partition, node()}},
      spawn(saturn_proxy_vnode, send_label_delay, [MyId, Label, Partition, Seq, Delay]),
      case groups_manager_serv:get_datanodes(Key) of
          {ok, Group} ->
              lists:foreach(fun({Host, Port}) ->
  
negative.code: terminate(_Reason, _State) ->
      ok.
  
  check_myid(S0) ->
      Value = riak_core_metadata:get(?MYIDPREFIX, ?MYIDKEY),
      case Value of
  