mirror of https://github.com/citusdata/citus.git
Do not move a shard to a node that it already exists on
parent
c968dc9c27
commit
3f11139b5c
|
@ -2795,10 +2795,18 @@ FindAllowedTargetFillState(RebalanceState *state, uint64 shardId)
|
||||||
shardId,
|
shardId,
|
||||||
targetFillState->node,
|
targetFillState->node,
|
||||||
state->functions->context))
|
state->functions->context))
|
||||||
|
{
|
||||||
|
bool targetHasShard = PlacementsHashFind(state->placementsHash,
|
||||||
|
shardId,
|
||||||
|
targetFillState->node);
|
||||||
|
|
||||||
|
/* skip if the shard is already placed on the target node */
|
||||||
|
if (!targetHasShard)
|
||||||
{
|
{
|
||||||
return targetFillState;
|
return targetFillState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue