Check all placements aren't inactive

pull/2664/head
Hadi Moshayedi 2019-04-17 16:57:33 -07:00
parent 7b1d03772d
commit c9b1d9c2d1
1 changed files with 6 additions and 0 deletions

View File

@ -5213,6 +5213,12 @@ ActiveShardPlacementLists(List *taskList)
/* filter out shard placements that reside in inactive nodes */
List *activeShardPlacementList = ActivePlacementList(shardPlacementList);
if (activeShardPlacementList == NIL)
{
ereport(ERROR,
(errmsg("no active placements were found for shard " UINT64_FORMAT,
anchorShardId)));
}
/* sort shard placements by their creation time */
activeShardPlacementList = SortList(activeShardPlacementList,