anchor.diff:              %% outstanding txids to trigger a delete of the items.
       end;
   
  -%% generated by on(?register_TP) via msg_delay to not increase memory
  -%% footprint
  -on({tx_tm_rtm_delete_txid, TxId}, State) ->
  -    ?TRACE("tx_tm_rtm:on({delete_txid, ...}) ~n", []),
  -    %% Debug diagnostics and output:
  -    %%     {Status, Entry} = get_tx_entry(TxId, State),
  -    %%     case Status of
  -    %%         new -> ok; %% already deleted
  -    %%         uninitialized ->
  -    %%             %% @TODO inform delayed tps that they missed something?
  -    %%             %% See info in hold back queue.
  -    %%             io:format("Deleting an txid with hold back messages.~n~p~n",
  -    %%                       [tx_state_get_hold_back(Entry)]);
  -    %%         ok ->
  -    %%             io:format("Oops, this should have been cleaned normally.~n")
  -    %%     end,
  -    pdb:delete(TxId, state_get_tablename(State)),
  -    State;
  -
  -%% generated by on(learner_decide) via msg_delay to not increase memory
  -%% footprint
  -on({tx_tm_rtm_delete_itemid, TxItemId}, State) ->
  -    ?TRACE("tx_tm_rtm:on({delete_itemid, ...}) ~n", []),
  -    %% Debug diagnostics and output:
  -    %% {Status, Entry} = get_item_entry(TxItemId, State),
  -    %% case Status of
  -    %%     new -> ok; %% already deleted
  -    %%     uninitialized ->
  -    %% %%             %% @TODO inform delayed learners that they missed something?
  -    %%             %% See info in hold back queue.
  -    %%         io:format("Deleting an item with hold back massages.~n~p~n",
  -    %%                   [tx_item_get_hold_back(Entry)]);
  -    %%     ok ->
  -    %%         io:format("Oops, this should have been cleaned normally.~n")
  -    %% end,
  -    pdb:delete(TxItemId, state_get_tablename(State)),
  -    State;
  -
   %% sent by init_RTMs
   on({?tx_tm_rtm_init_RTM, TxState, ItemStates, _InRole} = _Msg, State) ->
      ?TRACE("tx_tm_rtm:on({init_RTM, ...}) ~n", []),
  
positive.code:     {DeleteIt, NewState} =
          case ErrCode of
              ok when Role =:= tx_tm ->
                  RTMs = tx_state_get_rtms(TxState),
                  send_to_rtms(RTMs, fun(_X) -> Msg end),
                  %% inform used learner to delete paxosids.
                  AllPaxIds = get_paxos_ids(State, TxState),
                  %% We could delete immediately, but we still miss the
  
negative.code:             {_, TxState} = get_tx_entry(TxId, State),
              _ = case ItemResult of
                      state_updated ->
                          _ = set_entry(TxState, State);
                          % trigger_delete_if_done(TxState, State);
                      item_newly_safe ->
                          {TxResult, TmpTxState} = tx_state_add_item_acked(TxState),
                          NewTxState =
  