mirror of https://github.com/citusdata/citus.git
Merge pull request #2664 from citusdata/fix-ActivePlacementList
Don't schedule tasks on inactive nodes.pull/2690/head
commit
4cb8ed0f9a
|
@ -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,
|
||||
|
@ -5271,7 +5277,7 @@ ActivePlacementList(List *placementList)
|
|||
|
||||
/* check if the worker node for this shard placement is active */
|
||||
workerNode = FindWorkerNode(placement->nodeName, placement->nodePort);
|
||||
if (workerNode != NULL)
|
||||
if (workerNode != NULL && workerNode->isActive)
|
||||
{
|
||||
activePlacementList = lappend(activePlacementList, placement);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue