Move sync node metadata to above

velioglu/wo_seq_test_1
Burak Velioglu 2022-01-20 14:30:28 +03:00
parent 0932ea9a46
commit 632d7b8038
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
1 changed files with 10 additions and 20 deletions

View File

@ -1124,21 +1124,12 @@ ActivateNode(char *nodeName, int nodePort)
if (syncMetadata) if (syncMetadata)
{ {
/* SyncNodeMetadataToNode(nodeName, nodePort);
* 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));
} }
SetUpDistributedTableWithDependencies(workerNode); SetUpDistributedTableWithDependencies(workerNode);
if (syncMetadata) if (syncMetadata && !NodeIsCoordinator(workerNode))
{
SyncNodeMetadataToNode(nodeName, nodePort);
if (!NodeIsCoordinator(workerNode))
{ {
List *metadataUpdateCommandList = ResyncMetadataCommandList(); List *metadataUpdateCommandList = ResyncMetadataCommandList();
@ -1150,7 +1141,6 @@ ActivateNode(char *nodeName, int nodePort)
CurrentUserName(), CurrentUserName(),
metadataUpdateCommandList); metadataUpdateCommandList);
} }
}
/* finally, let all other active metadata nodes to learn about this change */ /* finally, let all other active metadata nodes to learn about this change */
WorkerNode *newWorkerNode = SetNodeState(nodeName, nodePort, isActive); WorkerNode *newWorkerNode = SetNodeState(nodeName, nodePort, isActive);