log.debug("Skipping local partition afterExchange (will not create): " + p);
continue;
}
GridDhtPartitionState state = locPart.state();
if (state == MOVING) {
if (cctx.preloadEnabled()) {
Collection<GridNode> owners = owners(p);
// If there are no other owners, then become an owner.
if (F.isEmpty(owners)) {
boolean owned = locPart.own();
assert owned : "Failed to own partition [cacheName" + cctx.name() + ", locPart=" +
locPart + ']';
updateLocal(p, loc.id(), locPart.state(), updateSeq);
changed = true;
if (log.isDebugEnabled())
log.debug("Owned partition: " + locPart);
}
else if (log.isDebugEnabled())
log.debug("Will not own partition (there are owners to preload from) [locPart=" +
locPart + ", owners = " + owners + ']');
}
else
updateLocal(p, loc.id(), locPart.state(), updateSeq);
}
}
else {
if (locPart != null) {
GridDhtPartitionState state = locPart.state();
if (state == MOVING) {
locPart.rent(false);
updateLocal(p, loc.id(), locPart.state(), updateSeq);