/** * @throws IgniteCheckedException If failed. */ private void proceedMapping() throws IgniteCheckedException { boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { proceedMapping0(); } finally { if (set) cctx.tm().setTxTopologyHint(null); } }
/** * @throws IgniteCheckedException If failed. */ private void proceedMapping() throws IgniteCheckedException { boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { proceedMapping0(); } finally { if (set) cctx.tm().setTxTopologyHint(null); } }
/** {@inheritDoc} */ @Override public final void prepare() { // Obtain the topology version to use. long threadId = Thread.currentThread().getId(); AffinityTopologyVersion topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId); // If there is another system transaction in progress, use it's topology version to prevent deadlock. if (topVer == null && tx.system()) { topVer = cctx.tm().lockedTopologyVersion(threadId, tx); if (topVer == null) topVer = tx.topologyVersionSnapshot(); } if (topVer != null) { tx.topologyVersion(topVer); cctx.mvcc().addFuture(this); prepare0(false, true); return; } prepareOnTopology(false, null); }
topVer = tx.topologyVersionSnapshot();
topVer = tx.topologyVersionSnapshot();
topVer = tx.topologyVersionSnapshot();
AffinityTopologyVersion topVer = topologyVersionSnapshot();
return new GridFinishedFuture<>(retMap); AffinityTopologyVersion topVer = topologyVersionSnapshot();
/** * Initializes future. * * @param remap Remap flag. */ @Override protected void prepare0(boolean remap, boolean topLocked) { boolean txStateCheck = remap ? tx.state() == PREPARING : tx.state(PREPARING); if (!txStateCheck) { if (tx.isRollbackOnly() || tx.setRollbackOnly()) { if (tx.timedOut()) onDone(null, tx.timeoutException()); else onDone(null, tx.rollbackException()); } else onDone(null, new IgniteCheckedException("Invalid transaction state for " + "prepare [state=" + tx.state() + ", tx=" + this + ']')); return; } boolean set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { prepare(tx.readEntries(), tx.writeEntries(), remap, topLocked); markInitialized(); } finally { if (set) cctx.tm().setTxTopologyHint(null); } }
topVer = tx.topologyVersionSnapshot();
if (tx.topologyVersionSnapshot() == null) new TxTopologyVersionFuture(tx, cctx).get();
AffinityTopologyVersion topVer = topologyVersionSnapshot(); AffinityTopologyVersion topVer = topologyVersionSnapshot();
return; boolean set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot());
/** * @throws IgniteCheckedException If failed. */ private void proceedMapping() throws IgniteCheckedException { boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { proceedMapping0(); } finally { if (set) cctx.tm().setTxTopologyHint(null); } }
/** * @throws IgniteCheckedException If failed. */ private void proceedMapping() throws IgniteCheckedException { boolean set = tx != null && cctx.shared().tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { proceedMapping0(); } finally { if (set) cctx.tm().setTxTopologyHint(null); } }
/** {@inheritDoc} */ @Override public final void prepare() { // Obtain the topology version to use. long threadId = Thread.currentThread().getId(); AffinityTopologyVersion topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId); // If there is another system transaction in progress, use it's topology version to prevent deadlock. if (topVer == null && tx.system()) { topVer = cctx.tm().lockedTopologyVersion(threadId, tx); if (topVer == null) topVer = tx.topologyVersionSnapshot(); } if (topVer != null) { tx.topologyVersion(topVer); cctx.mvcc().addFuture(this); prepare0(false, true); return; } prepareOnTopology(false, null); }
/** */ private void init() { // Obtain the topology version to use. long threadId = Thread.currentThread().getId(); AffinityTopologyVersion topVer = cctx.mvcc().lastExplicitLockTopologyVersion(threadId); // If there is another system transaction in progress, use it's topology version to prevent deadlock. if (topVer == null && tx.system()) topVer = cctx.tm().lockedTopologyVersion(threadId, tx); if (topVer != null) tx.topologyVersion(topVer); if (topVer == null) topVer = tx.topologyVersionSnapshot(); if (topVer != null) { for (GridDhtTopologyFuture fut : cctx.shared().exchange().exchangeFutures()) { if (fut.exchangeDone() && fut.topologyVersion().equals(topVer)) { Throwable err = fut.validateCache(cctx, false, false, null, null); if (err != null) { onDone(err); return; } break; } } onDone(topVer); topLocked = true; return; } acquireTopologyVersion(); }
topVer = tx.topologyVersionSnapshot();
topVer = tx.topologyVersionSnapshot();
/** * Initializes future. * * @param remap Remap flag. */ @Override protected void prepare0(boolean remap, boolean topLocked) { boolean txStateCheck = remap ? tx.state() == PREPARING : tx.state(PREPARING); if (!txStateCheck) { if (tx.isRollbackOnly() || tx.setRollbackOnly()) { if (tx.timedOut()) onDone(null, tx.timeoutException()); else onDone(null, tx.rollbackException()); } else onDone(null, new IgniteCheckedException("Invalid transaction state for " + "prepare [state=" + tx.state() + ", tx=" + this + ']')); return; } boolean set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { prepare(tx.readEntries(), tx.writeEntries(), remap, topLocked); markInitialized(); } finally { if (set) cctx.tm().setTxTopologyHint(null); } }