/** * @param nodeId Node ID. * @param res Response. */ private void processNearTxPrepareResponse(UUID nodeId, GridNearTxPrepareResponse res) { if (txPrepareMsgLog.isDebugEnabled()) txPrepareMsgLog.debug("Received near prepare response [txId=" + res.version() + ", node=" + nodeId + ']'); GridNearTxPrepareFutureAdapter fut = (GridNearTxPrepareFutureAdapter)ctx.mvcc() .<IgniteInternalTx>versionedFuture(res.version(), res.futureId()); if (fut == null) { U.warn(log, "Failed to find future for near prepare response [txId=" + res.version() + ", node=" + nodeId + ", res=" + res + ']'); return; } IgniteInternalTx tx = fut.tx(); assert tx != null; res.txState(tx.txState()); fut.onResult(nodeId, res); }
/** * @param nodeId Node ID. * @param res Response. */ private void processNearTxPrepareResponse(UUID nodeId, GridNearTxPrepareResponse res) { if (txPrepareMsgLog.isDebugEnabled()) txPrepareMsgLog.debug("Received near prepare response [txId=" + res.version() + ", node=" + nodeId + ']'); GridNearTxPrepareFutureAdapter fut = (GridNearTxPrepareFutureAdapter)ctx.mvcc() .<IgniteInternalTx>versionedFuture(res.version(), res.futureId()); if (fut == null) { U.warn(log, "Failed to find future for near prepare response [txId=" + res.version() + ", node=" + nodeId + ", res=" + res + ']'); return; } IgniteInternalTx tx = fut.tx(); assert tx != null; res.txState(tx.txState()); fut.onResult(nodeId, res); }