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
|
@ -2796,7 +2796,15 @@ FindAllowedTargetFillState(RebalanceState *state, uint64 shardId)
|
|||
targetFillState->node,
|
||||
state->functions->context))
|
||||
{
|
||||
return targetFillState;
|
||||
bool targetHasShard = PlacementsHashFind(state->placementsHash,
|
||||
shardId,
|
||||
targetFillState->node);
|
||||
|
||||
/* skip if the shard is already placed on the target node */
|
||||
if (!targetHasShard)
|
||||
{
|
||||
return targetFillState;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue