mirror of https://github.com/citusdata/citus.git
Sync metadata first before propagating any
parent
f66b1d5116
commit
3d828bc7b6
|
@ -1134,12 +1134,6 @@ ActivateNode(char *nodeName, int nodePort)
|
||||||
{
|
{
|
||||||
bool isActive = true;
|
bool isActive = true;
|
||||||
|
|
||||||
CheckCitusVersion(ERROR);
|
|
||||||
EnsureCoordinator();
|
|
||||||
EnsureModificationsCanRun();
|
|
||||||
|
|
||||||
EnsureSequentialModeMetadataOperations();
|
|
||||||
|
|
||||||
/* take an exclusive lock on pg_dist_node to serialize pg_dist_node changes */
|
/* take an exclusive lock on pg_dist_node to serialize pg_dist_node changes */
|
||||||
LockRelationOid(DistNodeRelationId(), ExclusiveLock);
|
LockRelationOid(DistNodeRelationId(), ExclusiveLock);
|
||||||
|
|
||||||
|
@ -1169,16 +1163,15 @@ ActivateNode(char *nodeName, int nodePort)
|
||||||
BoolGetDatum(isActive));
|
BoolGetDatum(isActive));
|
||||||
}
|
}
|
||||||
|
|
||||||
UseCoordinatedTransaction();
|
if (syncMetadata)
|
||||||
|
{
|
||||||
|
StartMetadataSyncToNode(nodeName, nodePort);
|
||||||
|
|
||||||
|
// TODO: Consider calling function below according to state
|
||||||
ClearDistributedObjectsWithMetadataFromNode(workerNode);
|
ClearDistributedObjectsWithMetadataFromNode(workerNode);
|
||||||
SetUpDistributedTableWithDependencies(workerNode);
|
SetUpDistributedTableWithDependencies(workerNode);
|
||||||
SetUpMultipleDistributedTableIntegrations(workerNode);
|
SetUpMultipleDistributedTableIntegrations(workerNode);
|
||||||
SetUpObjectMetadata(workerNode);
|
SetUpObjectMetadata(workerNode);
|
||||||
|
|
||||||
if (syncMetadata)
|
|
||||||
{
|
|
||||||
StartMetadataSyncToNode(nodeName, nodePort);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* finally, let all other active metadata nodes to learn about this change */
|
/* finally, let all other active metadata nodes to learn about this change */
|
||||||
|
|
Loading…
Reference in New Issue