Skip to content

Commit fc4051f

Browse files
WIP
1 parent 8e9c706 commit fc4051f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ else if (added)
433433
for (int p = 0; p < partitions; p++) {
434434
if (localNode(p, affAssignment)) {
435435
// Partition is created first time, so it's safe to own it.
436-
boolean shouldOwn = locParts.get(p) == null;
436+
boolean shouldOwn = locParts.get(p) == null && added;
437437

438438
GridDhtLocalPartition locPart = getOrCreatePartition(p);
439439

@@ -444,6 +444,15 @@ else if (added)
444444
log.debug("Partition has been owned (created first time) " +
445445
"[grp=" + grp.cacheOrGroupName() + ", p=" + locPart.id() + ']');
446446
}
447+
else {
448+
List<List<ClusterNode>> ideal = ctx.affinity().affinity(groupId()).idealAssignmentRaw();
449+
ctx.cache().context().affinity().addToWaitGroup(
450+
groupId(),
451+
p,
452+
topologyVersionFuture().initialVersion(),
453+
ideal.get(p)
454+
);
455+
}
447456

448457
needRefresh = true;
449458

0 commit comments

Comments
 (0)