unassigned.ignoreShard(shard, allocationDecision.getAllocationStatus(), allocation.changes()); if (!shard.primary()) { // we could not allocate it and we are a replica - check if we can ignore the other replicas while(i < primaryLength-1 && comparator.compare(primary[i], primary[i+1]) == 0) { unassigned.ignoreShard(primary[++i], allocationDecision.getAllocationStatus(), allocation.changes());
unassigned.ignoreShard(shard, allocationDecision.getAllocationStatus(), allocation.changes()); if (!shard.primary()) { // we could not allocate it and we are a replica - check if we can ignore the other replicas while(i < primaryLength-1 && comparator.compare(primary[i], primary[i+1]) == 0) { unassigned.ignoreShard(primary[++i], allocationDecision.getAllocationStatus(), allocation.changes());
unassigned.ignoreShard(shard, allocationDecision.getAllocationStatus(), allocation.changes()); if (!shard.primary()) { // we could not allocate it and we are a replica - check if we can ignore the other replicas while(i < primaryLength-1 && comparator.compare(primary[i], primary[i+1]) == 0) { unassigned.ignoreShard(primary[++i], allocationDecision.getAllocationStatus(), allocation.changes());
boolean drop = deciders.canAllocate(shard, allocation).type() == Type.NO; if (drop) { unassigned.ignoreShard(shard); while(i < primaryLength-1 && comparator.compare(primary[i], primary[i+1]) == 0) { unassigned.ignoreShard(primary[++i]); logger.trace("No Node found to assign shard [{}]", shard); unassigned.ignoreShard(shard); if (!shard.primary()) { // we could not allocate it and we are a replica - check if we can ignore the other replicas while(secondaryLength > 0 && comparator.compare(shard, secondary[secondaryLength-1]) == 0) { unassigned.ignoreShard(secondary[--secondaryLength]);
unassigned.ignoreShard(shard, allocationDecision.getAllocationStatus(), allocation.changes()); if (!shard.primary()) { // we could not allocate it and we are a replica - check if we can ignore the other replicas while(i < primaryLength-1 && comparator.compare(primary[i], primary[i+1]) == 0) { unassigned.ignoreShard(primary[++i], allocationDecision.getAllocationStatus(), allocation.changes());
/** * Removes and ignores the unassigned shard (will be ignored for this run, but * will be added back to unassigned once the metadata is constructed again). * Typically this is used when an allocation decision prevents a shard from being allocated such * that subsequent consumers of this API won't try to allocate this shard again. * * @param attempt the result of the allocation attempt */ public void removeAndIgnore(AllocationStatus attempt, RoutingChangesObserver changes) { nodes.ensureMutable(); innerRemove(); ignoreShard(current, attempt, changes); }
/** * Removes and ignores the unassigned shard (will be ignored for this run, but * will be added back to unassigned once the metadata is constructed again). * Typically this is used when an allocation decision prevents a shard from being allocated such * that subsequent consumers of this API won't try to allocate this shard again. * * @param attempt the result of the allocation attempt */ public void removeAndIgnore(AllocationStatus attempt, RoutingChangesObserver changes) { nodes.ensureMutable(); innerRemove(); ignoreShard(current, attempt, changes); }
/** * Removes and ignores the unassigned shard (will be ignored for this run, but * will be added back to unassigned once the metadata is constructed again). * Typically this is used when an allocation decision prevents a shard from being allocated such * that subsequent consumers of this API won't try to allocate this shard again. */ public void removeAndIgnore() { innerRemove(); ignoreShard(current); }
/** * Removes and ignores the unassigned shard (will be ignored for this run, but * will be added back to unassigned once the metadata is constructed again). * Typically this is used when an allocation decision prevents a shard from being allocated such * that subsequent consumers of this API won't try to allocate this shard again. * * @param attempt the result of the allocation attempt */ public void removeAndIgnore(AllocationStatus attempt, RoutingChangesObserver changes) { nodes.ensureMutable(); innerRemove(); ignoreShard(current, attempt, changes); }
/** * Removes and ignores the unassigned shard (will be ignored for this run, but * will be added back to unassigned once the metadata is constructed again). * Typically this is used when an allocation decision prevents a shard from being allocated such * that subsequent consumers of this API won't try to allocate this shard again. * * @param attempt the result of the allocation attempt */ public void removeAndIgnore(AllocationStatus attempt, RoutingChangesObserver changes) { nodes.ensureMutable(); innerRemove(); ignoreShard(current, attempt, changes); }