anchor.diff:      %% Calculate stable_snapshot from minimum of vectorclock of all partitions
       Stable_snapshot = riak_core_metadata:fold(
                           fun({_Key, V}, A) ->
  -                                find_min(V,A)
  +                                find_min(V,{Clock,A})
                           end,
                           Clock, ?META_PREFIX),
       {reply, {ok, Stable_snapshot},
  
positive.code: terminate(_Reason, _State) ->
      ok.
  
  find_min([VClock], StableClock) ->
      dict:fold(fun(Dc, Clock1, Snapshot) ->
                         case dict:find(Dc,StableClock) of
                             {ok, Clock2} ->
                                 dict:store(Dc, min(Clock1, Clock2), Snapshot);
                             _ -> Snapshot
                         end
                 end,
                 dict:new(),
                 VClock).
  
negative.code: 
  %% API
  start_vnode(I) ->
      {ok, Pid} = riak_core_vnode_master:get_vnode_pid(I, ?MODULE),
      riak_core_vnode:send_command(Pid, init),
      {ok,Pid}.
  
  %% @doc Initialize the clock
  init([Partition]) ->
      NewPClock = dict:new(),
      {ok, #currentclock{last_received_clock=dict:new(),
                        partition_vectorclock=NewPClock,
                        stable_snapshot = dict:new(),
                        partition = Partition}}.
  
  handle_command(init, _Sender,
                 #currentclock{partition = Partition,
                               partition_vectorclock=Clock} = State) ->
      try
          riak_core_metadata:put(?META_PREFIX, Partition, Clock),
          {reply, ok, State}
      catch
          _:Reason ->
              lager:error("Exception caught ~p! ",[Reason]),
              {reply, error, State}
      end;
  %% @doc
  handle_command(get_clock, _Sender,
                 #currentclock{partition_vectorclock=Clock} = State) ->
  