mirror of https://github.com/citusdata/citus.git
Rename metadata to node metadata on multiple points
parent
09764d6db3
commit
d93b46559e
|
@ -1996,8 +1996,8 @@ DetachPartitionCommandList(void)
|
||||||
return NIL;
|
return NIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
detachPartitionCommandList = lcons(DISABLE_DDL_PROPAGATION,
|
detachPartitionCommandList =
|
||||||
detachPartitionCommandList);
|
lcons(DISABLE_DDL_PROPAGATION, detachPartitionCommandList);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We probably do not need this but as an extra precaution, we are enabling
|
* We probably do not need this but as an extra precaution, we are enabling
|
||||||
|
@ -2019,13 +2019,13 @@ DetachPartitionCommandList(void)
|
||||||
* since updates on the pg_dist_node metadata must be rollbacked if anything
|
* since updates on the pg_dist_node metadata must be rollbacked if anything
|
||||||
* goes wrong.
|
* goes wrong.
|
||||||
*/
|
*/
|
||||||
static MetadataSyncResult
|
static NodeMetadataSyncResult
|
||||||
SyncNodeMetadataToNodes(void)
|
SyncNodeMetadataToNodes(void)
|
||||||
{
|
{
|
||||||
MetadataSyncResult result = METADATA_SYNC_SUCCESS;
|
NodeMetadataSyncResult result = NODE_METADATA_SYNC_SUCCESS;
|
||||||
if (!IsCoordinator())
|
if (!IsCoordinator())
|
||||||
{
|
{
|
||||||
return METADATA_SYNC_SUCCESS;
|
return NODE_METADATA_SYNC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2035,7 +2035,7 @@ SyncNodeMetadataToNodes(void)
|
||||||
*/
|
*/
|
||||||
if (!ConditionalLockRelationOid(DistNodeRelationId(), RowExclusiveLock))
|
if (!ConditionalLockRelationOid(DistNodeRelationId(), RowExclusiveLock))
|
||||||
{
|
{
|
||||||
return METADATA_SYNC_FAILED_LOCK;
|
return NODE_METADATA_SYNC_FAILED_LOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
List *syncedWorkerList = NIL;
|
List *syncedWorkerList = NIL;
|
||||||
|
@ -2051,7 +2051,7 @@ SyncNodeMetadataToNodes(void)
|
||||||
ereport(WARNING, (errmsg("failed to sync metadata to %s:%d",
|
ereport(WARNING, (errmsg("failed to sync metadata to %s:%d",
|
||||||
workerNode->workerName,
|
workerNode->workerName,
|
||||||
workerNode->workerPort)));
|
workerNode->workerPort)));
|
||||||
result = METADATA_SYNC_FAILED_SYNC;
|
result = NODE_METADATA_SYNC_FAILED_SYNC;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2072,7 +2072,7 @@ SyncNodeMetadataToNodes(void)
|
||||||
if (!nodeUpdated->metadataSynced)
|
if (!nodeUpdated->metadataSynced)
|
||||||
{
|
{
|
||||||
/* set the result to FAILED to trigger the sync again */
|
/* set the result to FAILED to trigger the sync again */
|
||||||
result = METADATA_SYNC_FAILED_SYNC;
|
result = NODE_METADATA_SYNC_FAILED_SYNC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2126,11 +2126,11 @@ SyncNodeMetadataToNodesMain(Datum main_arg)
|
||||||
{
|
{
|
||||||
UseCoordinatedTransaction();
|
UseCoordinatedTransaction();
|
||||||
|
|
||||||
MetadataSyncResult result = SyncNodeMetadataToNodes();
|
NodeMetadataSyncResult result = SyncNodeMetadataToNodes();
|
||||||
syncedAllNodes = (result == METADATA_SYNC_SUCCESS);
|
syncedAllNodes = (result == NODE_METADATA_SYNC_SUCCESS);
|
||||||
|
|
||||||
/* we use LISTEN/NOTIFY to wait for metadata syncing in tests */
|
/* we use LISTEN/NOTIFY to wait for metadata syncing in tests */
|
||||||
if (result != METADATA_SYNC_FAILED_LOCK)
|
if (result != NODE_METADATA_SYNC_FAILED_LOCK)
|
||||||
{
|
{
|
||||||
Async_Notify(METADATA_SYNC_CHANNEL, NULL);
|
Async_Notify(METADATA_SYNC_CHANNEL, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,10 @@ extern int MetadataSyncRetryInterval;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
METADATA_SYNC_SUCCESS = 0,
|
NODE_METADATA_SYNC_SUCCESS = 0,
|
||||||
METADATA_SYNC_FAILED_LOCK = 1,
|
NODE_METADATA_SYNC_FAILED_LOCK = 1,
|
||||||
METADATA_SYNC_FAILED_SYNC = 2
|
NODE_METADATA_SYNC_FAILED_SYNC = 2
|
||||||
} MetadataSyncResult;
|
} NodeMetadataSyncResult;
|
||||||
|
|
||||||
/* Functions declarations for metadata syncing */
|
/* Functions declarations for metadata syncing */
|
||||||
extern void SyncNodeMetadataToNode(const char *nodeNameString, int32 nodePort);
|
extern void SyncNodeMetadataToNode(const char *nodeNameString, int32 nodePort);
|
||||||
|
|
Loading…
Reference in New Issue