mirror of https://github.com/citusdata/citus.git
Address minor comments
parent
3b49102729
commit
a810ee2d40
|
@ -150,7 +150,7 @@ static bool got_SIGALRM = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* start_metadata_sync_to_node function sets hasmetadata column of the given
|
* start_metadata_sync_to_node function sets hasmetadata column of the given
|
||||||
* node to true, and then synchronizes the metadata on the node.
|
* node to true, and then activate node without replicating reference tables.
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
start_metadata_sync_to_node(PG_FUNCTION_ARGS)
|
start_metadata_sync_to_node(PG_FUNCTION_ARGS)
|
||||||
|
@ -169,6 +169,7 @@ start_metadata_sync_to_node(PG_FUNCTION_ARGS)
|
||||||
SetLocalReplicateReferenceTablesOnActivate(false);
|
SetLocalReplicateReferenceTablesOnActivate(false);
|
||||||
|
|
||||||
ActivateNode(nodeNameString, nodePort);
|
ActivateNode(nodeNameString, nodePort);
|
||||||
|
TransactionModifiedNodeMetadata = true;
|
||||||
|
|
||||||
SetLocalReplicateReferenceTablesOnActivate(prevReplicateRefTablesOnActivate);
|
SetLocalReplicateReferenceTablesOnActivate(prevReplicateRefTablesOnActivate);
|
||||||
|
|
||||||
|
@ -369,6 +370,8 @@ stop_metadata_sync_to_node(PG_FUNCTION_ARGS)
|
||||||
workerNode = SetWorkerColumn(workerNode, Anum_pg_dist_node_metadatasynced,
|
workerNode = SetWorkerColumn(workerNode, Anum_pg_dist_node_metadatasynced,
|
||||||
BoolGetDatum(false));
|
BoolGetDatum(false));
|
||||||
|
|
||||||
|
TransactionModifiedNodeMetadata = true;
|
||||||
|
|
||||||
PG_RETURN_VOID();
|
PG_RETURN_VOID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,8 +539,8 @@ DropMetadataSnapshotOnNode(WorkerNode *workerNode)
|
||||||
REMOVE_ALL_SHELL_TABLES_COMMAND);
|
REMOVE_ALL_SHELL_TABLES_COMMAND);
|
||||||
dropMetadataCommandList = list_concat(dropMetadataCommandList,
|
dropMetadataCommandList = list_concat(dropMetadataCommandList,
|
||||||
NodeMetadataDropCommands());
|
NodeMetadataDropCommands());
|
||||||
dropMetadataCommandList = lappend(dropMetadataCommandList, LocalGroupIdUpdateCommand(
|
dropMetadataCommandList = lappend(dropMetadataCommandList,
|
||||||
0));
|
LocalGroupIdUpdateCommand(0));
|
||||||
|
|
||||||
/* remove all dist table and object/table related metadata afterwards */
|
/* remove all dist table and object/table related metadata afterwards */
|
||||||
dropMetadataCommandList = lappend(dropMetadataCommandList, DELETE_ALL_PARTITIONS);
|
dropMetadataCommandList = lappend(dropMetadataCommandList, DELETE_ALL_PARTITIONS);
|
||||||
|
@ -546,7 +549,7 @@ DropMetadataSnapshotOnNode(WorkerNode *workerNode)
|
||||||
dropMetadataCommandList = lappend(dropMetadataCommandList,
|
dropMetadataCommandList = lappend(dropMetadataCommandList,
|
||||||
DELETE_ALL_DISTRIBUTED_OBJECTS);
|
DELETE_ALL_DISTRIBUTED_OBJECTS);
|
||||||
|
|
||||||
EnsureSequentialModeMetadataOperations();
|
Assert(superuser());
|
||||||
SendOptionalMetadataCommandListToWorkerInCoordinatedTransaction(
|
SendOptionalMetadataCommandListToWorkerInCoordinatedTransaction(
|
||||||
workerNode->workerName,
|
workerNode->workerName,
|
||||||
workerNode->workerPort,
|
workerNode->workerPort,
|
||||||
|
|
Loading…
Reference in New Issue