You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/09/25 00:24:04 UTC
ignite git commit: IGNITE-1537 - Addressing review comments.
Repository: ignite
Updated Branches:
refs/heads/ignite-1537 b6f5b311a -> e4ce66bab
IGNITE-1537 - Addressing review comments.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e4ce66ba
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e4ce66ba
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e4ce66ba
Branch: refs/heads/ignite-1537
Commit: e4ce66bab0937835b177ba8c654dbf221aae2e1d
Parents: b6f5b31
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Sep 24 15:23:53 2015 -0700
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Sep 24 15:23:53 2015 -0700
----------------------------------------------------------------------
.../near/GridNearOptimisticTxPrepareFuture.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/e4ce66ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index aa5e1cb..5e62b33 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -429,7 +429,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
prepare(
tx.optimistic() && tx.serializable() ? tx.readEntries() : Collections.<IgniteTxEntry>emptyList(),
- tx.writeEntries());
+ tx.writeEntries(), remap);
markInitialized();
}
@@ -441,8 +441,9 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
/**
* @param reads Read entries.
* @param writes Write entries.
+ * @param remap Remap flag.
*/
- private void prepare(Iterable<IgniteTxEntry> reads, Iterable<IgniteTxEntry> writes) {
+ private void prepare(Iterable<IgniteTxEntry> reads, Iterable<IgniteTxEntry> writes, boolean remap) {
AffinityTopologyVersion topVer = tx.topologyVersion();
assert topVer.topologyVersion() > 0;
@@ -468,7 +469,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
GridDistributedTxMapping cur = null;
for (IgniteTxEntry read : reads) {
- GridDistributedTxMapping updated = map(read, topVer, cur, false);
+ GridDistributedTxMapping updated = map(read, topVer, cur, false, remap);
if (cur != updated) {
mappings.offer(updated);
@@ -485,7 +486,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
}
for (IgniteTxEntry write : writes) {
- GridDistributedTxMapping updated = map(write, topVer, cur, true);
+ GridDistributedTxMapping updated = map(write, topVer, cur, true, remap);
if (cur != updated) {
mappings.offer(updated);
@@ -628,7 +629,8 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
IgniteTxEntry entry,
AffinityTopologyVersion topVer,
@Nullable GridDistributedTxMapping cur,
- boolean waitLock
+ boolean waitLock,
+ boolean remap
) {
GridCacheContext cacheCtx = entry.context();
@@ -654,7 +656,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearTxPrepareFutureAd
else
entry.cached(cacheCtx.local().entryEx(entry.key(), topVer));
- if (cacheCtx.isNear() || cacheCtx.isLocal()) {
+ if (!remap && (cacheCtx.isNear() || cacheCtx.isLocal())) {
if (waitLock && entry.explicitVersion() == null)
keyLockFut.addLockKey(entry.txKey());
}