anchor.diff:              E2 = tx_tlog:set_entry_value(E1, Value),
               E3 = tx_tlog:set_entry_status(E2, value),
               {E3, {ok}}
  +    end.
  +
  +%% @doc For 2-Phase operations like add_del_on_list and add_on_nr, we need to
  +%%      keep any previous error in the tlog status and do not overwrite it with
  +%%      the new one. If there is no error yet, set it to the given one.
  +-spec update_tlog_entry_2phase_op(Entry::tx_tlog:tlog_entry(), Error::{fail, atom()})
  +        -> tx_tlog:tlog_entry().
  +update_tlog_entry_2phase_op(Entry, Error) ->
  +    case tx_tlog:get_entry_status(Entry) of
  +        {fail, _} -> Entry;
  +        not_found -> tx_tlog:set_entry_status(Entry, {fail, not_found});
  +        _         -> tx_tlog:set_entry_status(Entry, Error)
       end.
   
   %% @doc Simulate a change on a set via read and write requests.
  
positive.code:     {NewTLogEntry, ResultEntry} =
          case Req of
              %% native functions first:
              {rdht_tx_read, Key}         -> tlog_read(Entry, Key);
              {rdht_tx_write, Key, Value} -> tlog_write(Entry, Key, Value);
              %% non-native functions:
              {add_del_on_list, Key, ToAdd, ToDel} -> tlog_add_del_on_list(Entry, Key, ToAdd, ToDel);
              {add_on_nr, Key, X}          -> tlog_add_on_nr(Entry, Key, X);
              {test_and_set, Key, Old, New} -> tlog_test_and_set(Entry, Key, Old, New)
          end,
      NewTLog = tx_tlog:update_entry(TLog, NewTLogEntry),
  
negative.code: -spec tlog_add_on_nr(tx_tlog:tlog_entry(), client_key(),
                        client_value()) ->
                               {tx_tlog:tlog_entry(), result_entry_write()}.
  tlog_add_on_nr(Entry, _Key, X) when (not erlang:is_number(X)) ->
      Error = {fail, not_a_number},
      {update_tlog_entry_2phase_op(Entry, Error), Error};
  tlog_add_on_nr(Entry, Key, X) ->
      {_, Res0} = tlog_read(Entry, Key),
      case Res0 of
  