/**
  * 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.
  */
 public void markTransactionCompleted(GlobalTransaction globalTx, boolean successful) {
   if (trace) log.tracef("Marking transaction %s as completed", globalTx);
   completedTransactions.put(
       globalTx, new CompletedTransactionInfo(timeService.time(), successful));
 }