/** * Marks all locks as ready for local transaction. */ private void readyLocks() { // Ready all locks. if (log.isDebugEnabled()) log.debug("Marking all local candidates as ready: " + this); readyLocks(req.writes()); if (tx.serializable() && tx.optimistic()) readyLocks(req.reads()); locksReady = true; }
GridDhtTopologyFuture topFut = cctx.exchange().lastFinishedFuture(); if (topFut != null && !isEmpty(req.writes())) { GridCacheContext ctx = F.first(req.writes()).context(); Throwable err = topFut.validateCache(ctx, req.recovery(), isEmpty(req.writes()), null, null); if (!F.isEmpty(req.writes()) || (ser && !F.isEmpty(req.reads()))) { Map<Integer, Collection<KeyCacheObject>> forceKeys = null; for (IgniteTxEntry entry : req.writes()) forceKeys = checkNeedRebalanceKeys(entry, forceKeys);
for (IgniteTxEntry e : F.concat(false, req.reads(), req.writes())) { GridCacheContext ctx = e.context();
ret = new GridCacheReturn(null, tx.localResult(), true, null, true); for (IgniteTxEntry writeEntry : req.writes()) { IgniteTxEntry txEntry = tx.entry(writeEntry.txKey());
IgniteTxEntry firstWrite = unmarshal(req.writes()); IgniteTxEntry firstRead = unmarshal(req.reads());
/** * Marks all locks as ready for local transaction. */ private void readyLocks() { // Ready all locks. if (log.isDebugEnabled()) log.debug("Marking all local candidates as ready: " + this); readyLocks(req.writes()); if (tx.serializable() && tx.optimistic()) readyLocks(req.reads()); locksReady = true; }
/** * @param expVer Expected topology version. * @param curVer Current topology version. * @param req Request. * @return {@code True} if cache affinity changed and request should be remapped. */ private boolean needRemap(AffinityTopologyVersion expVer, AffinityTopologyVersion curVer, GridNearTxPrepareRequest req) { if (expVer.equals(curVer)) return false; // TODO IGNITE-6754 check mvcc crd for mvcc enabled txs. for (IgniteTxEntry e : F.concat(false, req.reads(), req.writes())) { GridCacheContext ctx = e.context(); Collection<ClusterNode> cacheNodes0 = ctx.discovery().cacheGroupAffinityNodes(ctx.groupId(), expVer); Collection<ClusterNode> cacheNodes1 = ctx.discovery().cacheGroupAffinityNodes(ctx.groupId(), curVer); if (!cacheNodes0.equals(cacheNodes1) || ctx.affinity().affinityTopologyVersion().compareTo(curVer) < 0) return true; try { List<List<ClusterNode>> aff1 = ctx.affinity().assignments(expVer); List<List<ClusterNode>> aff2 = ctx.affinity().assignments(curVer); if (!aff1.equals(aff2)) return true; } catch (IllegalStateException ignored) { return true; } } return false; }
ret = new GridCacheReturn(null, tx.localResult(), true, null, true); for (IgniteTxEntry writeEntry : req.writes()) { IgniteTxEntry txEntry = tx.entry(writeEntry.txKey());
IgniteTxEntry firstWrite = unmarshal(req.writes()); IgniteTxEntry firstRead = unmarshal(req.reads());