mirror of https://github.com/citusdata/citus.git
Tiny refactor to master_create_empty_shard
parent
ee270b65d7
commit
e6c375eb81
|
@ -70,7 +70,6 @@ master_create_empty_shard(PG_FUNCTION_ARGS)
|
|||
{
|
||||
text *relationNameText = PG_GETARG_TEXT_P(0);
|
||||
char *relationName = text_to_cstring(relationNameText);
|
||||
List *workerNodeList = NIL;
|
||||
uint64 shardId = INVALID_SHARD_ID;
|
||||
uint32 attemptableNodeCount = 0;
|
||||
uint32 liveNodeCount = 0;
|
||||
|
@ -88,8 +87,6 @@ master_create_empty_shard(PG_FUNCTION_ARGS)
|
|||
|
||||
CheckCitusVersion(ERROR);
|
||||
|
||||
workerNodeList = ActiveWorkerNodeList();
|
||||
|
||||
EnsureTablePermissions(relationId, ACL_INSERT);
|
||||
CheckDistributedTable(relationId);
|
||||
|
||||
|
@ -155,6 +152,7 @@ master_create_empty_shard(PG_FUNCTION_ARGS)
|
|||
}
|
||||
else if (ShardPlacementPolicy == SHARD_PLACEMENT_ROUND_ROBIN)
|
||||
{
|
||||
List *workerNodeList = ActiveWorkerNodeList();
|
||||
candidateNode = WorkerGetRoundRobinCandidateNode(workerNodeList, shardId,
|
||||
candidateNodeIndex);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue