anchor.diff:  ensure_ring(State) -> State.
   
   %% @private
  -terminate(_,#state{tref=TRef}) -> timer:cancel(TRef), ok.
  +terminate(_,_) -> ok.
   
   %% @private
   code_change(_OldVsn, State, _Extra) -> {ok, State}.
  
positive.code: -define(QSIZE, 1000).
  -define(NFRAGS, 1024).
  -define(FLUSH_INTERVAL, 1000).
  -record(state, {ops, ring, tref}).
  
  % State.ops is a dict, keys are bucketname atoms, vals are lists of operations,
  % where operations are tuples of {Op::[add|del], riak_object:key()}
  
negative.code: handle_info(timeout, State=#state{ops=Ops}) ->
      NewState = ensure_ring(State),
      do_write_all(Ops, NewState#state.ring),
      {noreply, NewState#state{ops=dict:new(), count=0}};
  handle_info(_,State) -> {stop,badmsg,State}.
  