mirror of https://github.com/citusdata/citus.git
Move adding tenant statistic attributes to local_executor to keep track of both local shard queries and local cached queries
parent
9a0ed9844f
commit
bb2ab9e93c
|
@ -103,6 +103,7 @@
|
|||
#include "optimizer/optimizer.h"
|
||||
#include "nodes/params.h"
|
||||
#include "utils/snapmgr.h"
|
||||
#include "distributed/utils/attribute.h"
|
||||
|
||||
/* controlled via a GUC */
|
||||
bool EnableLocalExecution = true;
|
||||
|
@ -646,6 +647,8 @@ LocallyExecuteTaskPlan(PlannedStmt *taskPlan, char *queryString,
|
|||
LocalExecutorShardId = task->anchorShardId;
|
||||
}
|
||||
|
||||
AttributeTask(task->partitionColumn, task->colocationId, taskPlan->commandType);
|
||||
|
||||
PG_TRY();
|
||||
{
|
||||
processedRows = ExecuteTaskPlan(taskPlan, queryString, tupleDest, task,
|
||||
|
|
|
@ -400,7 +400,6 @@ SetTaskQueryIfShouldLazyDeparse(Task *task, Query *query)
|
|||
task->taskQuery.queryType = TASK_QUERY_OBJECT;
|
||||
task->taskQuery.data.jobQueryReferenceForLazyDeparsing = query;
|
||||
task->queryCount = 1;
|
||||
AttributeTask(task->partitionColumn, task->colocationId, query->commandType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -146,8 +146,11 @@ distributed_planner(Query *parse,
|
|||
bool fastPathRouterQuery = false;
|
||||
Node *distributionKeyValue = NULL;
|
||||
|
||||
AttributeQueryIfAnnotated(query_string, parse->commandType);
|
||||
|
||||
if (query_string != NULL)
|
||||
{
|
||||
AttributeQueryIfAnnotated(query_string, parse->commandType);
|
||||
}
|
||||
|
||||
List *rangeTableList = ExtractRangeTableEntryList(parse);
|
||||
|
||||
if (cursorOptions & CURSOR_OPT_FORCE_DISTRIBUTED)
|
||||
|
|
|
@ -205,9 +205,6 @@ AttributeQueryIfAnnotated(const char *query_string, CmdType commandType)
|
|||
*/
|
||||
void AttributeTask(char *tenantId, int colocationId, CmdType commandType)
|
||||
{
|
||||
ereport(NOTICE, (errmsg("MyProcPid: %d", MyProcPid)));
|
||||
sleep(10);
|
||||
|
||||
colocationGroupId = colocationId;
|
||||
strcpy_s(attributeToTenant, sizeof(attributeToTenant), tenantId);
|
||||
attributeCommandType = commandType;
|
||||
|
|
Loading…
Reference in New Issue