code: public void markTransactionCompleted(GlobalTransaction gtx, boolean successful) {
        if (completedTransactionsInfo != null) {
           completedTransactionsInfo.markTransactionCompleted(gtx, successful);
        }
     }
docs: With the current state transfer implementation it is possible for a transaction to be prepared several times
  on a remote node. This might cause leaks, e.g. if the transaction is prepared, committed and prepared again.
  Once marked as completed (because of commit or rollback) any further prepare received on that transaction are discarded.