mirror of https://github.com/citusdata/citus.git
Rename obj function
parent
7ad5773598
commit
8a1b033bca
|
@ -106,7 +106,7 @@ static void InsertPlaceholderCoordinatorRecord(void);
|
||||||
static void InsertNodeRow(int nodeid, char *nodename, int32 nodeport, NodeMetadata
|
static void InsertNodeRow(int nodeid, char *nodename, int32 nodeport, NodeMetadata
|
||||||
*nodeMetadata);
|
*nodeMetadata);
|
||||||
static void DeleteNodeRow(char *nodename, int32 nodeport);
|
static void DeleteNodeRow(char *nodename, int32 nodeport);
|
||||||
static void SyncObjectDependenciesToNode(WorkerNode *workerNode);
|
static void SyncDistributedObjectsToNode(WorkerNode *workerNode);
|
||||||
static void UpdateLocalGroupIdOnNode(WorkerNode *workerNode);
|
static void UpdateLocalGroupIdOnNode(WorkerNode *workerNode);
|
||||||
static void SyncPgDistTableMetadataToNode(WorkerNode *workerNode);
|
static void SyncPgDistTableMetadataToNode(WorkerNode *workerNode);
|
||||||
static List * InterTableRelationshipCommandList();
|
static List * InterTableRelationshipCommandList();
|
||||||
|
@ -715,7 +715,7 @@ PropagateNodeWideObjectsCommandList()
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SyncObjectDependenciesCommandList returns commands to sync object dependencies
|
* SyncDistributedObjectsCommandList returns commands to sync object dependencies
|
||||||
* to the given worker node. To be idempotent, it first drops the ones required to be
|
* to the given worker node. To be idempotent, it first drops the ones required to be
|
||||||
* dropped.
|
* dropped.
|
||||||
*
|
*
|
||||||
|
@ -730,7 +730,7 @@ PropagateNodeWideObjectsCommandList()
|
||||||
* requires it.
|
* requires it.
|
||||||
*/
|
*/
|
||||||
List *
|
List *
|
||||||
SyncObjectDependenciesCommandList(WorkerNode *workerNode)
|
SyncDistributedObjectsCommandList(WorkerNode *workerNode)
|
||||||
{
|
{
|
||||||
List *commandList = NIL;
|
List *commandList = NIL;
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ SyncObjectDependenciesCommandList(WorkerNode *workerNode)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SyncObjectDependenciesToNode sync the object dependencies to the node. It includes
|
* SyncDistributedObjectsToNode sync the distributed objects to the node. It includes
|
||||||
* - All dependencies (e.g., types, schemas, sequences)
|
* - All dependencies (e.g., types, schemas, sequences)
|
||||||
* - All shell distributed table
|
* - All shell distributed table
|
||||||
* - Inter relation between those shell tables
|
* - Inter relation between those shell tables
|
||||||
|
@ -773,7 +773,7 @@ SyncObjectDependenciesCommandList(WorkerNode *workerNode)
|
||||||
* since all the dependencies should be present in the coordinator already.
|
* since all the dependencies should be present in the coordinator already.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
SyncObjectDependenciesToNode(WorkerNode *workerNode)
|
SyncDistributedObjectsToNode(WorkerNode *workerNode)
|
||||||
{
|
{
|
||||||
if (NodeIsCoordinator(workerNode))
|
if (NodeIsCoordinator(workerNode))
|
||||||
{
|
{
|
||||||
|
@ -790,7 +790,7 @@ SyncObjectDependenciesToNode(WorkerNode *workerNode)
|
||||||
EnsureSequentialModeMetadataOperations();
|
EnsureSequentialModeMetadataOperations();
|
||||||
Assert(ShouldPropagate());
|
Assert(ShouldPropagate());
|
||||||
|
|
||||||
List *commandList = SyncObjectDependenciesCommandList(workerNode);
|
List *commandList = SyncDistributedObjectsCommandList(workerNode);
|
||||||
|
|
||||||
/* send commands to new workers, the current user should be a superuser */
|
/* send commands to new workers, the current user should be a superuser */
|
||||||
Assert(superuser());
|
Assert(superuser());
|
||||||
|
@ -1112,11 +1112,11 @@ ActivateNode(char *nodeName, int nodePort)
|
||||||
UpdateLocalGroupIdOnNode(workerNode);
|
UpdateLocalGroupIdOnNode(workerNode);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sync object dependencies first. We must sync object dependencies before
|
* Sync distributed objects first. We must sync distributed objects before
|
||||||
* replicating reference tables to the remote node, as reference tables may
|
* replicating reference tables to the remote node, as reference tables may
|
||||||
* need such objects.
|
* need such objects.
|
||||||
*/
|
*/
|
||||||
SyncObjectDependenciesToNode(workerNode);
|
SyncDistributedObjectsToNode(workerNode);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to replicate reference tables before syncing node metadata, otherwise
|
* We need to replicate reference tables before syncing node metadata, otherwise
|
||||||
|
|
|
@ -50,7 +50,7 @@ activate_node_snapshot(PG_FUNCTION_ARGS)
|
||||||
|
|
||||||
List *updateLocalGroupCommand =
|
List *updateLocalGroupCommand =
|
||||||
list_make1(LocalGroupIdUpdateCommand(dummyWorkerNode->groupId));
|
list_make1(LocalGroupIdUpdateCommand(dummyWorkerNode->groupId));
|
||||||
List *syncObjectDepCommands = SyncObjectDependenciesCommandList(dummyWorkerNode);
|
List *syncDistObjCommands = SyncDistributedObjectsCommandList(dummyWorkerNode);
|
||||||
List *dropSnapshotCommands = NodeMetadataDropCommands();
|
List *dropSnapshotCommands = NodeMetadataDropCommands();
|
||||||
List *createSnapshotCommands = NodeMetadataCreateCommands();
|
List *createSnapshotCommands = NodeMetadataCreateCommands();
|
||||||
List *pgDistTableMetadataSyncCommands = PgDistTableMetadataSyncCommandList();
|
List *pgDistTableMetadataSyncCommands = PgDistTableMetadataSyncCommandList();
|
||||||
|
@ -61,7 +61,7 @@ activate_node_snapshot(PG_FUNCTION_ARGS)
|
||||||
|
|
||||||
activateNodeCommandList = list_concat(activateNodeCommandList,
|
activateNodeCommandList = list_concat(activateNodeCommandList,
|
||||||
updateLocalGroupCommand);
|
updateLocalGroupCommand);
|
||||||
activateNodeCommandList = list_concat(activateNodeCommandList, syncObjectDepCommands);
|
activateNodeCommandList = list_concat(activateNodeCommandList, syncDistObjCommands);
|
||||||
activateNodeCommandList = list_concat(activateNodeCommandList, dropSnapshotCommands);
|
activateNodeCommandList = list_concat(activateNodeCommandList, dropSnapshotCommands);
|
||||||
activateNodeCommandList = list_concat(activateNodeCommandList,
|
activateNodeCommandList = list_concat(activateNodeCommandList,
|
||||||
createSnapshotCommands);
|
createSnapshotCommands);
|
||||||
|
|
Loading…
Reference in New Issue