anchor.diff:  tp_commit_store_unlock([]) ->
       ok;
   tp_commit_store_unlock([Entry | LogRest])->
  -    if 
  -	Entry#logentry.operation == write ->
  +    case Entry#logentry.operation of
  +	write ->
   	    ?DB:write(Entry#logentry.rkey, Entry#logentry.value, Entry#logentry.version),
   	    %_Stored = ?DB:read(Entry#logentry.rkey),
   	    ?DB:unset_write_lock(Entry#logentry.rkey);
  -	true ->
  +	_Any ->
   	    ?DB:unset_read_lock(Entry#logentry.rkey)
       end,
       
  
positive.code: tp_abort_unlock([]) ->
      ok;	    
  tp_abort_unlock([Entry | LogRest])->
      if 
  	Entry#logentry.status == prepared ->
  	    case Entry#logentry.operation of
  		write ->
  		    ?DB:unset_write_lock(Entry#logentry.rkey);
  		read ->
  		    ?DB:unset_read_lock(Entry#logentry.rkey)
  	    end;
  	true ->
  	    ok
      end,
      tp_abort_unlock(LogRest).    
  
negative.code:     ?TLOGN("aborting transaction ~p", [TransactionID]),
      TransLog = tp_log:get_log(State),
      TransLogUndecided = TransLog#translog.undecided,
      case gb_trees:is_defined(TransactionID, TransLogUndecided) of
  	true ->
  	    LogEntries = gb_trees:get(TransactionID, TransLogUndecided),
  	    tp_abort_unlock(LogEntries),
  	    NewTransLog = tp_log:get_log(State),
  	    tp_log:remove_from_undecided(State, TransactionID, NewTransLog, TransLogUndecided);
  	_Any ->
  	    %%get information about transaction --- might have missed something before
  	    State
      end.
  