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 2017/07/14 13:54:44 UTC
[6/6] ignite git commit: IGNITE-5757 - Rent partitions on exchange
completion
IGNITE-5757 - Rent partitions on exchange completion
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b4fe30c4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b4fe30c4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b4fe30c4
Branch: refs/heads/ignite-5757
Commit: b4fe30c484e07dd0a931ab438257a1f0c7827035
Parents: 1e7e692
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Jul 14 16:54:23 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Jul 14 16:54:23 2017 +0300
----------------------------------------------------------------------
.../dht/GridDhtPartitionTopologyImpl.java | 21 ++++++++++++--------
.../near/GridNearTxPrepareRequest.java | 8 ++++----
2 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b4fe30c4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index 601da1b..d0db02b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -383,9 +383,6 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
}
}
}
-
- if (node2part != null && node2part.valid())
- checkEvictions(updateSeq, aff);
}
updateRebalanceVersion(aff);
@@ -637,7 +634,12 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
}
}
- updateRebalanceVersion(grp.affinity().assignments(topVer));
+ List<List<ClusterNode>> aff = grp.affinity().assignments(topVer);
+
+ updateRebalanceVersion(aff);
+
+ if (node2part != null && node2part.valid())
+ checkEvictions(updateSeq, aff);
consistencyCheck();
}
@@ -737,8 +739,9 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
"[part=" + p + ", topVer=" + topVer + ", this.topVer=" + this.topVer + ']');
}
else if (loc != null && state == RENTING && !showRenting)
- throw new GridDhtInvalidPartitionException(p, "Adding entry to partition that is concurrently evicted " +
- "[part=" + p + ", shouldBeMoving=" + loc.reload() + "]");
+ throw new GridDhtInvalidPartitionException(p, "Adding entry to partition that is concurrently " +
+ "evicted [part=" + p + ", shouldBeMoving=" + loc.reload() + ", belongs=" + belongs +
+ ", topVer=" + topVer + ", curTopVer=" + this.topVer + "]");
if (loc == null) {
if (!treatAllPartAsLoc && !belongs)
@@ -1289,7 +1292,8 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
if (!affVer.equals(AffinityTopologyVersion.NONE) && affVer.compareTo(topVer) >= 0) {
List<List<ClusterNode>> aff = grp.affinity().assignments(topVer);
- changed |= checkEvictions(updateSeq, aff);
+ if (exchangeVer == null)
+ changed |= checkEvictions(updateSeq, aff);
updateRebalanceVersion(aff);
}
@@ -1478,7 +1482,8 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
if (!affVer.equals(AffinityTopologyVersion.NONE) && affVer.compareTo(topVer) >= 0) {
List<List<ClusterNode>> aff = grp.affinity().assignments(topVer);
- changed |= checkEvictions(updateSeq, aff);
+ if (exchId == null)
+ changed |= checkEvictions(updateSeq, aff);
updateRebalanceVersion(aff);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b4fe30c4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
index 29c7aad..875f397 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
@@ -406,13 +406,13 @@ public class GridNearTxPrepareRequest extends GridDistributedTxPrepareRequest {
StringBuilder flags = new StringBuilder();
if (near())
- flags.append("near");
+ flags.append("[near]");
if (firstClientRequest())
- flags.append("clientReq");
+ flags.append("[firstClientReq]");
if (implicitSingle())
- flags.append("single");
+ flags.append("[implicitSingle]");
if (explicitLock())
- flags.append("explicitLock");
+ flags.append("[explicitLock]");
return S.toString(GridNearTxPrepareRequest.class, this,
"flags", flags.toString(),