mirror of https://github.com/citusdata/citus.git
Prevent empty placement creation in the coordinator
parent
00bd784783
commit
5234caecca
|
@ -411,6 +411,14 @@ CreateAppendDistributedShardPlacements(Oid relationId, int64 shardId,
|
||||||
{
|
{
|
||||||
int workerNodeIndex = attemptNumber % workerNodeCount;
|
int workerNodeIndex = attemptNumber % workerNodeCount;
|
||||||
WorkerNode *workerNode = (WorkerNode *) list_nth(workerNodeList, workerNodeIndex);
|
WorkerNode *workerNode = (WorkerNode *) list_nth(workerNodeList, workerNodeIndex);
|
||||||
|
|
||||||
|
if (NodeIsCoordinator(workerNode))
|
||||||
|
{
|
||||||
|
ereport(NOTICE, (errmsg(
|
||||||
|
"Creating placements for the append partitioned tables on the coordinator is not allowed.")));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 nodeGroupId = workerNode->groupId;
|
uint32 nodeGroupId = workerNode->groupId;
|
||||||
char *nodeName = workerNode->workerName;
|
char *nodeName = workerNode->workerName;
|
||||||
uint32 nodePort = workerNode->workerPort;
|
uint32 nodePort = workerNode->workerPort;
|
||||||
|
|
Loading…
Reference in New Issue