/** * @param tx Transaction. * @param txNum Expected number of transactions on remote node. * @param nearTxCheck {@code True} if should check only tx on near node. * @param futId Future ID. * @param miniId Mini future ID. * @param addDepInfo Deployment info flag. */ public GridCacheTxRecoveryRequest(IgniteInternalTx tx, int txNum, boolean nearTxCheck, IgniteUuid futId, IgniteUuid miniId, boolean addDepInfo) { super(tx.xidVersion(), 0, addDepInfo); nearXidVer = tx.nearXidVersion(); sys = tx.system(); this.futId = futId; this.miniId = miniId; this.txNum = txNum; this.nearTxCheck = nearTxCheck; }
/** * @param tx Transaction to clear. */ public void clearThreadMap(IgniteInternalTx tx) { if (tx.local() && !tx.dht()) { assert tx instanceof GridNearTxLocal : tx; if (!tx.system()) threadMap.remove(tx.threadId(), tx); else { Integer cacheId = tx.txState().firstCacheId(); if (cacheId != null) sysThreadMap.remove(new TxThreadKey(tx.threadId(), cacheId), tx); else { for (Iterator<IgniteInternalTx> it = sysThreadMap.values().iterator(); it.hasNext(); ) { IgniteInternalTx txx = it.next(); if (tx == txx) { it.remove(); break; } } } } } }
if (!tx.system()) cctx.txMetrics().onTxRollback();
log.debug("Transaction finished: [commit=" + commit + ", tx=" + tx + ']'); if (tx.system() || tx.internal() || tx.mvccSnapshot() == null) return;
if (!tx.system()) cctx.txMetrics().onTxCommit();
this.txNodes = txNodes; setFlag(tx.system(), SYSTEM_TX_FLAG_MASK); setFlag(retVal, NEED_RETURN_VALUE_FLAG_MASK); setFlag(tx.isInvalidate(), INVALIDATE_FLAG_MASK);
/** * @param tx Transaction. * @param txNum Expected number of transactions on remote node. * @param nearTxCheck {@code True} if should check only tx on near node. * @param futId Future ID. * @param miniId Mini future ID. * @param addDepInfo Deployment info flag. */ public GridCacheTxRecoveryRequest(IgniteInternalTx tx, int txNum, boolean nearTxCheck, IgniteUuid futId, IgniteUuid miniId, boolean addDepInfo) { super(tx.xidVersion(), 0, addDepInfo); nearXidVer = tx.nearXidVersion(); sys = tx.system(); this.futId = futId; this.miniId = miniId; this.txNum = txNum; this.nearTxCheck = nearTxCheck; }
/** * @param tx Transaction to clear. */ public void clearThreadMap(IgniteInternalTx tx) { if (tx.local() && !tx.dht()) { assert tx instanceof GridNearTxLocal : tx; if (!tx.system()) threadMap.remove(tx.threadId(), tx); else { Integer cacheId = tx.txState().firstCacheId(); if (cacheId != null) sysThreadMap.remove(new TxThreadKey(tx.threadId(), cacheId), tx); else { for (Iterator<IgniteInternalTx> it = sysThreadMap.values().iterator(); it.hasNext(); ) { IgniteInternalTx txx = it.next(); if (tx == txx) { it.remove(); break; } } } } } }
if (!tx.system()) cctx.txMetrics().onTxRollback();
log.debug("Transaction finished: [commit=" + commit + ", tx=" + tx + ']'); if (tx.system() || tx.internal() || tx.mvccSnapshot() == null) return;
if (!tx.system()) cctx.txMetrics().onTxCommit();
this.txNodes = txNodes; setFlag(tx.system(), SYSTEM_TX_FLAG_MASK); setFlag(retVal, NEED_RETURN_VALUE_FLAG_MASK); setFlag(tx.isInvalidate(), INVALIDATE_FLAG_MASK);