anchor.diff:              put_r(Db, Key, NewValue),
               NewValue
           end,
  -    transaction(F, infinity, Opts).
  +    transaction(F, Retries, TimeLeft, Opts).
   
   
   %%--------------------------------------------------------------------
  
positive.code: %% where
  %%    Fun = function()
  %%
  %% @equiv transaction(Fun, infinity, [])
  %% @see transaction/3
  %% @end
  %%--------------------------------------------------------------------
  -spec transaction(Fun :: db_txn_fun()) -> {ok, db_value()} | db_txn_error().
  
negative.code: %%
  %% The 'Opts' parameter is used to pass flags to transaction/3.
  %%
  %% @spec update(Db, Key, Fun, Args, Retries, TimeLeft, Opts) -> {ok, Value} | {error, Error}
  %% where
  %%    Db = integer()
  %%    Key = term()
  %%    Fun = function()
  %%    Args = any()
  %%    Retries = integer()
  %%    TimeLeft = integer()
  %%    Opts = [atom()]
  %%
  %% @end
  %%--------------------------------------------------------------------
  -spec update(Db :: db(), Key :: db_key(), Fun :: db_update_fun(), Args :: db_update_fun_args(), 
               Retries :: db_txn_retries(), TimeLeft :: db_txn_timeleft(),  Opts :: db_flags()) ->
      {ok, db_value()} | db_txn_error().
  
  update(Db, Key, Fun, Args, Retries, TimeLeft, Opts) ->
      F = fun() ->
              Value = case get_r(Db, Key, [rmw]) of
                          not_found -> not_found;
  