mirror of https://github.com/citusdata/citus.git
54 lines
1.7 KiB
C
54 lines
1.7 KiB
C
/*
|
|
* multi_router_executor.h
|
|
*
|
|
* Function declarations used in executing distributed execution
|
|
* plan.
|
|
*
|
|
*/
|
|
|
|
#ifndef MULTI_ROUTER_EXECUTOR_H_
|
|
#define MULTI_ROUTER_EXECUTOR_H_
|
|
|
|
#include "c.h"
|
|
|
|
#include "access/sdir.h"
|
|
#include "distributed/multi_executor.h"
|
|
#include "distributed/multi_physical_planner.h"
|
|
#include "distributed/placement_connection.h"
|
|
#include "executor/execdesc.h"
|
|
#include "executor/tuptable.h"
|
|
#include "nodes/pg_list.h"
|
|
|
|
|
|
/*
|
|
* XactShardConnSet keeps track of the mapping from shard to the set of nodes
|
|
* involved in multi-statement transaction-wrapped modifications of that shard.
|
|
* This information is used to mark placements inactive at transaction close.
|
|
*/
|
|
typedef struct XactShardConnSet
|
|
{
|
|
uint64 shardId; /* identifier of the shard that was modified */
|
|
List *connectionEntryList; /* NodeConnectionEntry pointers to participating nodes */
|
|
} XactShardConnSet;
|
|
|
|
|
|
/* Config variables managed via guc.c */
|
|
extern bool AllModificationsCommutative;
|
|
extern bool EnableDeadlockPrevention;
|
|
|
|
extern void CitusModifyBeginScan(CustomScanState *node, EState *estate, int eflags);
|
|
extern TupleTableSlot * RouterSequentialModifyExecScan(CustomScanState *node);
|
|
extern TupleTableSlot * RouterSelectExecScan(CustomScanState *node);
|
|
extern TupleTableSlot * RouterMultiModifyExecScan(CustomScanState *node);
|
|
|
|
extern int64 ExecuteModifyTasksWithoutResults(List *taskList);
|
|
extern int64 ExecuteModifyTasksSequentiallyWithoutResults(List *taskList,
|
|
CmdType operation);
|
|
|
|
/* helper functions */
|
|
extern bool TaskListRequires2PC(List *taskList);
|
|
extern List * BuildPlacementSelectList(uint32 groupId, List *relationShardList);
|
|
extern List * BuildPlacementDDLList(uint32 groupId, List *relationShardList);
|
|
|
|
#endif /* MULTI_ROUTER_EXECUTOR_H_ */
|