Get rid of logging remaining supplier nodes rebalance time - Fixes
@@ -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);
}
