You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dg...@apache.org on 2018/12/24 20:22:36 UTC
ignite git commit: IGNITE-9149 Get rid of logging remaining supplier
nodes rebalance time - Fixes #4635.
Repository: ignite
Updated Branches:
refs/heads/master 02f552fc9 -> 423ac68f2
IGNITE-9149 Get rid of logging remaining supplier nodes rebalance time - Fixes #4635.
Signed-off-by: Dmitriy Govorukhin <dm...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/423ac68f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/423ac68f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/423ac68f
Branch: refs/heads/master
Commit: 423ac68f27f4a5cf259a7740b73279b3baaa4e3e
Parents: 02f552f
Author: ololo3000 <pm...@gmail.com>
Authored: Mon Dec 24 23:21:25 2018 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Mon Dec 24 23:21:25 2018 +0300
----------------------------------------------------------------------
.../dht/preloader/GridDhtPartitionDemander.java | 27 ++++++--------------
1 file changed, 8 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/423ac68f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index ddbb3b1..e970a63 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -444,13 +444,6 @@ public class GridDhtPartitionDemander {
return;
}
- synchronized (fut) { // Synchronized to prevent consistency issues in case of parallel cancellation.
- if (fut.isDone())
- return;
-
- fut.remaining.forEach((key, value) -> value.set1(U.currentTimeMillis()));
- }
-
final CacheConfiguration cfg = grp.config();
int totalStripes = ctx.gridConfig().getRebalanceThreadPoolSize();
@@ -465,7 +458,7 @@ public class GridDhtPartitionDemander {
if (fut.isDone())
break;
- parts = fut.remaining.get(node.id()).get2();
+ parts = fut.remaining.get(node.id());
U.log(log, "Prepared rebalancing [grp=" + grp.cacheOrGroupName()
+ ", mode=" + cfg.getRebalanceMode() + ", supplier=" + node.id() + ", partitionsCount=" + parts.size()
@@ -1002,8 +995,8 @@ public class GridDhtPartitionDemander {
/** */
private final IgniteLogger log;
- /** Remaining. T2: startTime, partitions */
- private final Map<UUID, T2<Long, IgniteDhtDemandedPartitionsMap>> remaining = new HashMap<>();
+ /** Remaining. */
+ private final Map<UUID, IgniteDhtDemandedPartitionsMap> remaining = new HashMap<>();
/** Missed. */
private final Map<UUID, Collection<Integer>> missed = new HashMap<>();
@@ -1041,7 +1034,7 @@ public class GridDhtPartitionDemander {
assert v.partitions() != null :
"Partitions are null [grp=" + grp.cacheOrGroupName() + ", fromNode=" + k.id() + "]";
- remaining.put(k.id(), new T2<>(U.currentTimeMillis(), v.partitions()));
+ remaining.put(k.id(), v.partitions());
});
this.routines = remaining.size();
@@ -1123,8 +1116,7 @@ public class GridDhtPartitionDemander {
return;
U.log(log, ("Cancelled rebalancing [grp=" + grp.cacheOrGroupName() +
- ", supplier=" + nodeId + ", topVer=" + topologyVersion() +
- ", time=" + (U.currentTimeMillis() - remaining.get(nodeId).get1()) + " ms]"));
+ ", supplier=" + nodeId + ", topVer=" + topologyVersion() + ']'));
cleanupRemoteContexts(nodeId);
@@ -1198,13 +1190,11 @@ public class GridDhtPartitionDemander {
if (grp.eventRecordable(EVT_CACHE_REBALANCE_PART_LOADED))
rebalanceEvent(p, EVT_CACHE_REBALANCE_PART_LOADED, exchId.discoveryEvent());
- T2<Long, IgniteDhtDemandedPartitionsMap> t = remaining.get(nodeId);
+ IgniteDhtDemandedPartitionsMap parts = remaining.get(nodeId);
- assert t != null : "Remaining not found [grp=" + grp.cacheOrGroupName() + ", fromNode=" + nodeId +
+ assert parts != null : "Remaining not found [grp=" + grp.cacheOrGroupName() + ", fromNode=" + nodeId +
", part=" + p + "]";
- IgniteDhtDemandedPartitionsMap parts = t.get2();
-
boolean rmvd = parts.remove(p);
assert rmvd : "Partition already done [grp=" + grp.cacheOrGroupName() + ", fromNode=" + nodeId +
@@ -1217,8 +1207,7 @@ public class GridDhtPartitionDemander {
"rebalancing [grp=" + grp.cacheOrGroupName() +
", supplier=" + nodeId +
", topVer=" + topologyVersion() +
- ", progress=" + (routines - remainingRoutines) + "/" + routines +
- ", time=" + (U.currentTimeMillis() - t.get1()) + " ms]"));
+ ", progress=" + (routines - remainingRoutines) + "/" + routines + "]"));
remaining.remove(nodeId);
}