mirror of https://github.com/citusdata/citus.git
Missing API from Metadata Sync
parent
bdbaf34df2
commit
d3a43dab63
|
@ -1346,6 +1346,23 @@ ShardListInsertCommand(List *shardIntervalList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ShardListDeleteCommand generates a command list that can be executed to delete
|
||||||
|
* shard and shard placement metadata for the given shard.
|
||||||
|
*/
|
||||||
|
List *
|
||||||
|
ShardDeleteCommandList(ShardInterval *shardInterval)
|
||||||
|
{
|
||||||
|
uint64 shardId = shardInterval->shardId;
|
||||||
|
|
||||||
|
StringInfo deleteShardCommand = makeStringInfo();
|
||||||
|
appendStringInfo(deleteShardCommand,
|
||||||
|
"SELECT citus_internal_delete_shard_metadata(%ld);", shardId);
|
||||||
|
|
||||||
|
return list_make1(deleteShardCommand->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NodeDeleteCommand generate a command that can be
|
* NodeDeleteCommand generate a command that can be
|
||||||
* executed to delete the metadata for a worker node.
|
* executed to delete the metadata for a worker node.
|
||||||
|
|
|
@ -53,6 +53,7 @@ extern char * DistributionDeleteCommand(const char *schemaName,
|
||||||
extern char * TableOwnerResetCommand(Oid distributedRelationId);
|
extern char * TableOwnerResetCommand(Oid distributedRelationId);
|
||||||
extern char * NodeListInsertCommand(List *workerNodeList);
|
extern char * NodeListInsertCommand(List *workerNodeList);
|
||||||
extern List * ShardListInsertCommand(List *shardIntervalList);
|
extern List * ShardListInsertCommand(List *shardIntervalList);
|
||||||
|
extern List * ShardDeleteCommandList(ShardInterval *shardInterval);
|
||||||
extern char * NodeDeleteCommand(uint32 nodeId);
|
extern char * NodeDeleteCommand(uint32 nodeId);
|
||||||
extern char * NodeStateUpdateCommand(uint32 nodeId, bool isActive);
|
extern char * NodeStateUpdateCommand(uint32 nodeId, bool isActive);
|
||||||
extern char * ShouldHaveShardsUpdateCommand(uint32 nodeId, bool shouldHaveShards);
|
extern char * ShouldHaveShardsUpdateCommand(uint32 nodeId, bool shouldHaveShards);
|
||||||
|
|
Loading…
Reference in New Issue