Fix null handling when creating AuxiliaryStructures

pull/6029/head
Nitish Upreti 2022-07-11 17:45:32 -07:00
parent cf8fea5a3f
commit 8f8761ed40
1 changed files with 11 additions and 4 deletions

View File

@ -558,6 +558,12 @@ CreateAuxiliaryStructuresForShardGroup(List *shardGroupSplitIntervalListList,
ddlCommandList,
shardInterval->shardId);
/*
* A task is expected to be instantiated with a non-null 'ddlCommandList'.
* The list can be empty, if no auxiliary structures are present.
*/
if (ddlCommandList != NULL)
{
uint64 jobId = shardInterval->shardId;
Task *ddlTask = CreateTaskForDDLCommandList(jobId, ddlCommandList,
workerPlacementNode);
@ -565,6 +571,7 @@ CreateAuxiliaryStructuresForShardGroup(List *shardGroupSplitIntervalListList,
ddlTaskExecList = lappend(ddlTaskExecList, ddlTask);
}
}
}
ExecuteTaskListOutsideTransaction(
ROW_MODIFY_NONE,