public void commitIfPrepared(IgniteInternalTx tx,Set<UUID> failedNodeIds){
  assert tx instanceof GridDhtTxLocal || tx instanceof GridDhtTxRemote : tx;
  assert !F.isEmpty(tx.transactionNodes()) : tx;
  assert tx.nearXidVersion() != null : tx;
  GridCacheTxRecoveryFuture fut=new GridCacheTxRecoveryFuture(cctx,tx,failedNodeIds,tx.transactionNodes());
  cctx.mvcc().addFuture(fut,fut.futureId());
  if (log.isDebugEnabled())   log.debug("Checking optimistic transaction state on remote nodes [tx=" + tx + ", fut="+ fut+ ']');
  fut.prepare();
}

public void commitIfPrepared ( IgniteInternalTx tx , Set < UUID > failedNodeIds ) { assert tx instanceof GridDhtTxLocal || tx instanceof GridDhtTxRemote : tx ; assert ! F . isEmpty ( tx . transactionNodes ( ) ) : tx ; assert tx . nearXidVersion ( ) != null : tx ; GridCacheTxRecoveryFuture fut = new GridCacheTxRecoveryFuture ( cctx , tx , failedNodeIds , tx . transactionNodes ( ) ) ; cctx . mvcc ( ) . addFuture ( fut , fut . futureId ( ) ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "Checking optimistic transaction state on remote nodes [tx=" + tx + ", fut=" + fut + ']' ) ; fut . prepare ( ) ; }
commits transaction in case when node started transaction failed , but all related transactions were prepared ( invalidates transaction if it is not fully prepared ) .
