/** * @param fut Future. */ public void addFuture(TxDeadlockFuture fut) { TxDeadlockFuture old = deadlockDetectFuts.put(fut.futureId(), fut); assert old == null : old; }
/** * @param nodeId Node ID. * @param fut Future. * @param txKeys Tx keys. */ void txLocksInfo(UUID nodeId, TxDeadlockFuture fut, Set<IgniteTxKey> txKeys) { ClusterNode node = cctx.node(nodeId); if (node == null) { if (log.isDebugEnabled()) log.debug("Failed to finish deadlock detection, node left: " + nodeId); fut.onDone(); return; } TxLocksRequest req = new TxLocksRequest(fut.futureId(), txKeys); try { if (!cctx.localNodeId().equals(nodeId)) req.prepareMarshal(cctx); cctx.gridIO().sendToGridTopic(node, TOPIC_TX, req, SYSTEM_POOL); } catch (IgniteCheckedException e) { if (e instanceof ClusterTopologyCheckedException) { if (log.isDebugEnabled()) log.debug("Failed to finish deadlock detection, node left: " + nodeId); } else U.warn(log, "Failed to finish deadlock detection: " + e, e); fut.onDone(); } }
/** * @param fut Future. */ public void addFuture(TxDeadlockFuture fut) { TxDeadlockFuture old = deadlockDetectFuts.put(fut.futureId(), fut); assert old == null : old; }
/** * @param nodeId Node ID. * @param fut Future. * @param txKeys Tx keys. */ void txLocksInfo(UUID nodeId, TxDeadlockFuture fut, Set<IgniteTxKey> txKeys) { ClusterNode node = cctx.node(nodeId); if (node == null) { if (log.isDebugEnabled()) log.debug("Failed to finish deadlock detection, node left: " + nodeId); fut.onDone(); return; } TxLocksRequest req = new TxLocksRequest(fut.futureId(), txKeys); try { if (!cctx.localNodeId().equals(nodeId)) req.prepareMarshal(cctx); cctx.gridIO().sendToGridTopic(node, TOPIC_TX, req, SYSTEM_POOL); } catch (IgniteCheckedException e) { if (e instanceof ClusterTopologyCheckedException) { if (log.isDebugEnabled()) log.debug("Failed to finish deadlock detection, node left: " + nodeId); } else U.warn(log, "Failed to finish deadlock detection: " + e, e); fut.onDone(); } }