mirror of https://github.com/citusdata/citus.git
Move sync node metadata to above
parent
0932ea9a46
commit
632d7b8038
|
@ -1124,21 +1124,12 @@ ActivateNode(char *nodeName, int nodePort)
|
|||
|
||||
if (syncMetadata)
|
||||
{
|
||||
/*
|
||||
* We are going to sync the metadata anyway in this transaction, so do
|
||||
* not fail just because the current metadata is not synced.
|
||||
*/
|
||||
SetWorkerColumn(workerNode, Anum_pg_dist_node_metadatasynced,
|
||||
BoolGetDatum(true));
|
||||
SyncNodeMetadataToNode(nodeName, nodePort);
|
||||
}
|
||||
|
||||
SetUpDistributedTableWithDependencies(workerNode);
|
||||
|
||||
if (syncMetadata)
|
||||
{
|
||||
SyncNodeMetadataToNode(nodeName, nodePort);
|
||||
|
||||
if (!NodeIsCoordinator(workerNode))
|
||||
if (syncMetadata && !NodeIsCoordinator(workerNode))
|
||||
{
|
||||
List *metadataUpdateCommandList = ResyncMetadataCommandList();
|
||||
|
||||
|
@ -1150,7 +1141,6 @@ ActivateNode(char *nodeName, int nodePort)
|
|||
CurrentUserName(),
|
||||
metadataUpdateCommandList);
|
||||
}
|
||||
}
|
||||
|
||||
/* finally, let all other active metadata nodes to learn about this change */
|
||||
WorkerNode *newWorkerNode = SetNodeState(nodeName, nodePort, isActive);
|
||||
|
|
Loading…
Reference in New Issue