Hello World shard split works

pull/6029/head
Nitish Upreti 2022-06-22 15:01:00 -07:00
parent a8e3344a40
commit ac29dbabf4
2 changed files with 3 additions and 3 deletions

View File

@ -50,8 +50,7 @@ citus_split_shard_by_split_points(PG_FUNCTION_ARGS)
INT4OID);
ArrayType *nodeIdsArrayObject = PG_GETARG_ARRAYTYPE_P(2);
List *nodeIdsForPlacementList = TextArrayTypeToIntegerList(nodeIdsArrayObject,
INT4OID);
List *nodeIdsForPlacementList = IntegerArrayTypeToList(nodeIdsArrayObject);
Oid shardSplitModeOid = PG_GETARG_OID(3);
SplitMode shardSplitMode = LookupSplitMode(shardSplitModeOid);

View File

@ -407,7 +407,8 @@ BlockingShardSplit(SplitOperation splitOperation,
/* Only single placement allowed (already validated by caller) */
List *sourcePlacementList = ActiveShardPlacementList(shardIntervalToSplit->shardId);
Assert(sourcePlacementList->length == 1);
WorkerNode *sourceShardToCopyNode = (WorkerNode *) linitial(sourcePlacementList);
ShardPlacement *sourceShardPlacement = (ShardPlacement *) linitial(sourcePlacementList);
WorkerNode *sourceShardToCopyNode = FindNodeWithNodeId(sourceShardPlacement->nodeId, false /* missingOk */);
/* Physically create split children and perform split copy */
List *splitOffShardList = NULL;