mirror of https://github.com/citusdata/citus.git
Refactors ExtendedTaskList methods
parent
dbdde111c1
commit
7e1a9a9fee
|
@ -729,6 +729,11 @@ static uint64 MicrosecondsBetweenTimestamps(instr_time startTime, instr_time end
|
||||||
static int WorkerPoolCompare(const void *lhsKey, const void *rhsKey);
|
static int WorkerPoolCompare(const void *lhsKey, const void *rhsKey);
|
||||||
static void SetAttributeInputMetadata(DistributedExecution *execution,
|
static void SetAttributeInputMetadata(DistributedExecution *execution,
|
||||||
ShardCommandExecution *shardCommandExecution);
|
ShardCommandExecution *shardCommandExecution);
|
||||||
|
static ExecutionParams *
|
||||||
|
GetExecutionParams(RowModifyLevel modLevel, List *taskList,
|
||||||
|
TupleDestination *tupleDest,
|
||||||
|
bool expectResults,
|
||||||
|
ParamListInfo paramListInfo);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1014,53 +1019,59 @@ ExecuteTaskListOutsideTransaction(RowModifyLevel modLevel, List *taskList,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prepare execution parameters for a task list.It is used by the
|
||||||
|
* functions that execute task lists.
|
||||||
|
*/
|
||||||
|
static ExecutionParams *
|
||||||
|
GetExecutionParams(RowModifyLevel modLevel, List *taskList,
|
||||||
|
TupleDestination *tupleDest,
|
||||||
|
bool expectResults,
|
||||||
|
ParamListInfo paramListInfo)
|
||||||
|
{
|
||||||
|
int targetPoolSize = MaxAdaptiveExecutorPoolSize;
|
||||||
|
bool localExecutionSupported = true;
|
||||||
|
ExecutionParams *executionParams = CreateBasicExecutionParams(
|
||||||
|
modLevel, taskList, targetPoolSize, localExecutionSupported
|
||||||
|
);
|
||||||
|
|
||||||
|
executionParams->xactProperties = DecideTransactionPropertiesForTaskList(
|
||||||
|
modLevel, taskList, false);
|
||||||
|
executionParams->expectResults = expectResults;
|
||||||
|
executionParams->tupleDestination = tupleDest;
|
||||||
|
executionParams->paramListInfo = paramListInfo;
|
||||||
|
|
||||||
|
return executionParams;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ExecuteTaskListIntoTupleDestWithParam is a proxy to ExecuteTaskListExtended() which uses
|
* ExecuteTaskListIntoTupleDestWithParam is a proxy to ExecuteTaskListExtended() which uses
|
||||||
* bind params from executor state, and with defaults for some of the arguments.
|
* bind params from executor state, and with defaults for some of the arguments.
|
||||||
*/
|
*/
|
||||||
uint64
|
uint64
|
||||||
ExecuteTaskListIntoTupleDestWithParam(RowModifyLevel modLevel, List *taskList,
|
ExecuteTaskListIntoTupleDestWithParam(RowModifyLevel modLevel, List *taskList,
|
||||||
TupleDestination *tupleDest,
|
TupleDestination *tupleDest,
|
||||||
bool expectResults,
|
bool expectResults,
|
||||||
ParamListInfo paramListInfo)
|
ParamListInfo paramListInfo)
|
||||||
{
|
{
|
||||||
int targetPoolSize = MaxAdaptiveExecutorPoolSize;
|
ExecutionParams *executionParams = GetExecutionParams(modLevel, taskList, tupleDest,
|
||||||
bool localExecutionSupported = true;
|
expectResults, paramListInfo);
|
||||||
ExecutionParams *executionParams = CreateBasicExecutionParams(
|
return ExecuteTaskListExtended(executionParams);
|
||||||
modLevel, taskList, targetPoolSize, localExecutionSupported
|
|
||||||
);
|
|
||||||
|
|
||||||
executionParams->xactProperties = DecideTransactionPropertiesForTaskList(
|
|
||||||
modLevel, taskList, false);
|
|
||||||
executionParams->expectResults = expectResults;
|
|
||||||
executionParams->tupleDestination = tupleDest;
|
|
||||||
executionParams->paramListInfo = paramListInfo;
|
|
||||||
|
|
||||||
return ExecuteTaskListExtended(executionParams);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ExecuteTaskListIntoTupleDest is a proxy to ExecuteTaskListExtended() with defaults
|
* ExecuteTaskListIntoTupleDest is a proxy to ExecuteTaskListExtended() with defaults
|
||||||
* for some of the arguments.
|
* for some of the arguments.
|
||||||
*/
|
*/
|
||||||
uint64
|
uint64
|
||||||
ExecuteTaskListIntoTupleDest(RowModifyLevel modLevel, List *taskList,
|
ExecuteTaskListIntoTupleDest(RowModifyLevel modLevel, List *taskList,
|
||||||
TupleDestination *tupleDest,
|
TupleDestination *tupleDest,
|
||||||
bool expectResults)
|
bool expectResults)
|
||||||
{
|
{
|
||||||
int targetPoolSize = MaxAdaptiveExecutorPoolSize;
|
ExecutionParams *executionParams = GetExecutionParams(modLevel, taskList, tupleDest,
|
||||||
bool localExecutionSupported = true;
|
expectResults, NULL);
|
||||||
ExecutionParams *executionParams = CreateBasicExecutionParams(
|
return ExecuteTaskListExtended(executionParams);
|
||||||
modLevel, taskList, targetPoolSize, localExecutionSupported
|
|
||||||
);
|
|
||||||
|
|
||||||
executionParams->xactProperties = DecideTransactionPropertiesForTaskList(
|
|
||||||
modLevel, taskList, false);
|
|
||||||
executionParams->expectResults = expectResults;
|
|
||||||
executionParams->tupleDestination = tupleDest;
|
|
||||||
|
|
||||||
return ExecuteTaskListExtended(executionParams);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue