Prevent multiple placements of a single shard to lead huge memory allocations

pull/2346/head
Onder Kalaci 2018-08-22 11:42:51 +03:00
parent cb481f55cf
commit 910ea392f5
1 changed files with 6 additions and 0 deletions

View File

@ -2545,6 +2545,12 @@ IntersectPlacementList(List *lhsPlacementList, List *rhsPlacementList)
WORKER_LENGTH) == 0)
{
placementList = lappend(placementList, rhsPlacement);
/*
* We don't need to add the same placement over and over again. This
* could happen if both placements of a shard appear on the same node.
*/
break;
}
}
}